It came as protesters rallied in the streets demanding change.
“There is an agreement with many measures and an annual monitoring mechanism” on meeting climate targets, said a government source.
The plan, which covers a slew of measures from tackling emissions in the energy and industrial sectors, to incentives for zero-emission electric vehicles or public transport, was due to be unveiled later on Friday.
Merkel and other political leaders endured a marathon debate through the night.
Before the deal was reached, Lars Klingbeil, general secretary of Merkel's junior coalition partner the Social Democrats urged patience. He said it was “better to negotiate for an extra hour and get an ambitious climate package in the end”.
As politicians were haggling indoors, outside in the streets across Germany, protesters were on the way with colourful banners and posters to join the biggest international wave of Fridays for Future climate strikes to date started by Swedish teen Greta Thunberg.
A major bridge in central Berlin was blocked off by demonstrators who strung red and white tape across the streets, hindering rush-hour traffic, while in the financial capital Frankfurt, sit-ins were underway.
After two blistering summers and thousands of youths joining school strikes week after week, climate has shot to the top of the political agenda in the EU's biggest economy.
— jensen (@jensotto83) September 20, 2019
In Bremen, the climate strike was underway on Friday morning with an estimated 10,000 participants.
For Merkel's coalition government, the stakes are also rising.
With the economy already projected to slide into recession in the third quarter, balancing the interests of its crucial export industries while not alienating young voters with their green demands was proving to be a tough balancing act.
The EU's biggest economy is set to miss climate targets for next year but has committed itself to meeting the 2030 goal of a 55 percent cut in greenhouse gas emissions from 1990 levels.
Export powerhouse Germany accounts for around two percent of the worldwide emissions blamed for heating the Earth's atmosphere, melting ice caps, rising sea levels and intensifying violent weather events.
Under a draft policy plan that Merkel's government was haggling over, a commitment of at least €100 billion was planned on climate protection by 2030.
But a key sticking point was the question of how to better price harmful carbon emissions from oil, gas and coal into economic activity in order to incentivize clean alternatives.
While Merkel's party wants to expand the trading of emission certificates, the Social Democrats, have called for a carbon tax.
Merkel, a scientist by profession, was once known as the “climate chancellor” as she pushed forward a green energy transition that vastly increased clean renewables such as wind and solar power.
However, many of those gains have been eroded by an increased reliance on dirty coal, in part to offset the phase-out by 2022 of nuclear power that Merkel decided after Japan's 2011 Fukushima disaster.
Her government this year announced a coal phase-out by 2038, but faces local opposition from mining regions, especially in the ex-communist east, where the far-right AfD party has capitalised on fears over job losses.
Car-mad Germany has also lagged badly behind in the transport sector, where state-coddled auto giants VW, Daimler and BMW have long focused on gas-guzzling SUVs more than hybrid or zero-emission electric cars.
Mindful of the 800,000 jobs tied to the auto sector, Merkel's government is also cautious that new environment taxes could set off the type of “yellow-vest” anti-government protests that have plagued neighbouring France.
But the young warn that delaying action is not an option, calling the threat existential with devastating consequences during their lifetimes.
“We are heading for a life-destroying crisis and so far nothing has happened,” said Linus Steinmetz of the student movement.
“That's why we're raising the pressure – together we're strong.”
By Hui Min Neo