Under the accord between Chancellor Angela Merkel's Christian Democrats and the Social Democrats, who have been in an acrimonious "grand coalition" since 2005, the tax on new cars will take effect in 2010.
It will be paid into the coffers of the federal government in Berlin, as opposed to those of the car-loving nation's 16 states, senior officials from the two parties said as they announced the deal.
Berlin will then pay the states about €8.9 billion to compensate for the loss of revenue.
The new tax system was proposed last year by Environment Minister Sigmar Gabriel who said it would encourage automakers to design cars that emit less carbon dioxide, which are blamed for global warming.
The government also hopes it will prompt consumers to buy greener vehicles.
In a bid to lower harmful emissions across the whole European Union, Brussels has also set out plans to sharply reduce the level of CO2 emitted by new cars by introducing a Europe-wide target of 120 grammes per kilometre from 2012.
Berlin and Germany's powerful auto industry baulked at the plan, saying it would penalize local producers who build cars that are far heavier on fuel than the smaller models made in Italy and France.
Merkel and French President Nicolas Sarkozy reached a compromise at a summit this week, proposing to the rest of the EU that carmakers be given until 2015 to reach the target for models that are already in production.