Scholz's centre-left Social Democrats (SPD), the ecologist Greens and the libertarian Free Democrats (FDP) want to accelerate the transition to a green economy and digitalisation while maintaining fiscal discipline, according to a 177-page agreement.
The alliance - named a traffic light coalition after the three parties' respective colours - has a majority in the lower house of parliament and hopes the government will be sworn in early next month after the parties ratify the coalition pact.
The first alliance at a federal level between the ideologically disparate parties will end 16 years of Merkel-led conservative government, marking a new era for relations with Europe and the rest of the world.
The three parties defied predictions that their coalition talks would last into next year or fail, and managed to keep details of their negotiations under wraps following an inconclusive election in September.
At a news conference in Berlin, flanked by the FDP and Greens leaders, Scholz recalled that when the first traffic light was erected at the city's Potsdamer Platz in 1924, many questioned whether it could work.
"Today, the traffic light is indispensable when it comes to regulating things clearly and providing the right orientation and ensuring that everyone moves forward safely and smoothly, " he said.
"My ambition as chancellor is that this traffic light alliance will play a similarly groundbreaking role for Germany."
Merkel leaves big shoes to fill. She has navigated Germany and Europe through multiple crises and been a champion of liberal democracy in the face of rising authoritarianism worldwide.
Her critics say she has managed rather than solved problems and leaves her successor tough decisions on many fronts.
Scholz's incoming government faces immediate challenges, with Europe grappling with the fallout from Brexit, a crisis on the European Union's border with Belarus and surging COVID-19 cases.
While Germany's electoral campaign was largely focused on domestic issues, the coalition pact shed light on the next government's foreign policy priorities.
The parties agreed to strengthen the EU's economic and monetary union and signalled an openness to reform the bloc's fiscal rules, also known as the Stability and Growth Pact.
They also agreed Germany would remain part of NATO's nuclear sharing agreement, a move that will prevent a rift in the Western military alliance at a time of rising tensions with Russia.
MERKEL BIDS FAREWELL
Presiding over what could be her final cabinet meeting, Merkel bade her colleagues farewell earlier in the day, and Scholz presented the EU's longest-serving leader with a tree to plant in her garden, according to a person at the meeting.
As finance minister and vice chancellor in the outgoing "grand coalition" of the SPD and conservatives, Scholz, 63, was seen as a competent rather than a charismatic politician who, like Merkel, has moderate views and is adept at dialogue.
He now needs to build and maintain a consensus between the Greens and SPD, who are widely seen as natural centre-left partners, and the fiscally hawkish FDP have historically been closer to Germany's conservatives.
While the coalition did not name its cabinet line-up on Wednesday, FDP leader Christian Lindner, 42, is widely expected to take over at the finance ministry and Greens co-leader Robert Habeck, 52, to take on a newly expanded economy and climate change ministry.
Merkel did not seek re-election after four terms as chancellor. Her personal popularity ratings remain high, but her party is in disarray and facing a leadership contest after achieving its worst results in a federal vote following a gaffe-prone campaign by its candidate for chancellor.