Kramp-Karrenbauer - a Merkel protege - defeated Friedrich Merz, a Merkel rival who has questioned the constitutional guarantee of asylum to all "politically persecuted" in the second round with 517 votes against 482.
Sometimes dubbed "mini Merkel", Kramp-Karrenbauer is admired by the CDU upper echelons for her appeal across the party. She has been interior minister of the state of Saarland before becoming its leader, a position she held for six years, and earlier this year was elected to the post of general secretary of the CDU securing 99% of party support.
Merkel said in October she would step down as party chief but remain chancellor, an effort to manage her exit after a series of setbacks since her divisive decision in 2015 to keep German borders open to refugees fleeing war in the Middle East.
Whoever wins will face towering challenges for the party, which is now drawing roughly 30% at the polls, far below the around 40% it enjoyed during Merkel's heyday.
She expressed "overwhelming gratitude" for having had the role of CDU leader.
She stressed that the CDU stood for human dignity, and praised the late US President George Bush Senior and late German Chancellor Helmut Kohl for reuniting Germany in 1990.
"We will all miss her", he said.
German Chancellor Angela Merkel waves after her speech at the party convention of the Christian Democratic Party CDU in Hamburg, Germany, Friday, Dec. 7, 2018.
Merkel said Thursday that 18 years at the helm "is a long, long time - and the CDU has, of course, experienced ups and downs in this time", but also won four consecutive elections.
Merkel listed some of those moments and many more in a half-hour farewell speech as leader, telling delegates that 'our CDU today is different from the year 2000, and that is a good thing'.
In a brief, upbeat address before the vote that brought many delegates to their feet, she called on the party to reject the politics of fear as the far-right makes inroads in Germany and Europe. She also allowed the introduction of gay marriage, which Kramp-Karrenbauer was more vehement in opposing.
For years, Merkel's popularity lifted the CDU and its Bavaria-only sister party, the Christian Social Union. He won 157 votes.
She now inherits the task of improving the CDU's political fortunes and trying to win back voters from rivals to the right and left, while working with Merkel as chancellor until Germany's next election.
During her campaign to succeed Merkel as party leader, she repeatedly noted that she was able to blunt an onslaught by the anti-immigrant Alternative for Germany (AfD) party as it picked up seats in state after state.
"In hard times we shouldn't forget our Christian and democratic stance", she said. "But. we faced an hour of destiny for the Christian Democratic Union 18 years ago".
"Whether it's the rejection of multilateralism, the return to nationalism, the reduction of worldwide cooperation to deal-making or threatened trade wars... hybrid warfare, destabilization of societies with fake news or the future of our European Union - we Christian Democrats must show in the face of all these challenges what we've got", she said. "And this is the motivation with which I am here and why I run for CDU party leadership", Spahn said.