The draft had also included a goal put forward by Turkey to raise electricity's share of total final world energy consumption to 35% by 2035, from around 23% now.
It was the first time since Copenhagen in 2009 that UN climate talks failed to adopt a deal by consensus, according to Reuters.
This year's conference was the first since the UN's environmental body confirmed in October that the rise in global temperature was set to exceed 1.5 degrees Celsius (2.7 degrees Fahrenheit).
That is the threshold countries agreed at the Paris climate talks more than a decade ago to try not to exceed. Beyond it, extreme weather impacts intensify.
The talks had already run into overtime as governments argued over the absence of fossil fuels from the draft.
Saudi Arabia and other major oil-producing countries had lobbied hard to keep any mention of fossil fuels out of the text, according to observers at the summit.
Panama said it could not support the text because it failed to address the scale and urgency of the climate crisis.
The failed draft had acknowledged the planet's projected temperature overshoot and called for faster development of carbon-removal technologies to eventually reverse it.
Scientists say removing carbon from the atmosphere, when paired with steep cuts in emissions, is vital to avoiding the worst impacts of climate change.
Critics of the proposed deal said they worried the carbon-removal language would be used as a license to keep pumping oil.
A representative for the Saudi delegation, which supported the mention of carbon removal, told the closing plenary that he was surprised by the resistance to technology, which he said offered a concrete solution.
Developing countries criticised the text for not providing enough new climate finance to help them adapt to a warming planet.
The deal had called for a tripling of such finance but did not say from what baseline. Critics said it could push more costs onto poor nations without a clear path away from fossil fuels.
With no text adopted, governments left without a new collective commitment on fossil fuels, adaptation finance or the electricity target.