Colbert, host of Comedy Central's "The Colbert Report," is signed for five years. Producers and the location for "The Late Show" when Colbert takes over will be announced at a later time, the network said.
"Stephen Colbert is one of the most inventive and respected forces on television," said Leslie Moonves, president and CEO of CBS.
Colbert will not be doing the show in his conservative political pundit character on "The Colbert Report."
"I won't be doing the new show in character, so we'll all get to find out how much of him was me. I'm looking forward to it," Colbert said in a statement.
Letterman, who turns 67 on Saturday, announced last week that after 21 years on the late-night talk show, he would be retiring in 2015 when his contract expires.
Letterman's late-night career has spanned more than 32 years and nearly 6,000 episodes. He was the first host of "Late Night" on NBC from 1982 to 1992. Letterman has been the only host of "The Late Show" on CBS, which debuted in 1993.
"Simply being a guest on David Letterman's show has been a highlight of my career," Colbert said. "I never dreamed that I would follow in his footsteps, though everyone in late night follows Dave's lead."
Colbert has appeared on "The Late Show" 12 times in the past. He has won five Emmys for his work on "The Colbert Report." He also spent eight years working for Comedy Central's "The Daily Show" as an on-air personality and writer.