The 193-member world body approved the resolution on a vote of 143-5 with seven abstentions. The US was joined in voting against the resolution by Russia, Turkey, Syria and the Philippines.
The resolution asks Secretary-General Antonio Guterres to produce a report for the next General Assembly session starting in September that identifies and assesses possible gaps in international environmental law and related legal instruments.
It also establishes a working group to discuss possible options for addressing any gaps with a view to making recommendations to the assembly in 2019 that could include holding a conference "to adopt an international instrument."
French Ambassador Francois Delattre, speaking on behalf of more than 90 co-sponsors of the resolution, told the assembly before the vote that the unprecedented deterioration of our environment is already causing hundreds of thousands of deaths due to planetary warming, water and air pollution, and the deterioration of biodiversity and soils.
"These attacks on the environment are affecting the most vulnerable populations first," he said.
"If we don't act decisively, we are exposing ourselves to dire consequences: the exhaustion of natural resources, migrations, and an upsurge in conflicts."
The US opposition was not surprising, given President Donald Trump's announcement last June that the United States would withdraw from the 2015 Paris agreement aimed at combating climate change.
US Ambassador Nikki Haley said of the new General Assembly resolution: "When international bodies attempt to force America into vague environmental commitments, it's a sure sign that American citizens and businesses will get stuck paying a large bill without getting large benefits."
"The proposed global compact is not in our interests, and we oppose it," she said.