The taped intro of President Barack Obama and former Presidents George Bush, Bill Clinton and George W. Bush referenced President Gerald Ford's declaration to the country when he took office following the 1974 resignation of Richard Nixon. Letterman sidled up to Obama to say, "you're just kidding, right?"
Letterman said goodbye after 33 years and 6,028 broadcasts of his late-night shows on CBS and NBC. The final Late Show broadcast ran long, some 17 minutes over its usual hour, and CBS planned to let the show air without cutting it.
He opened his final monologue with, "I'll be honest with you: it's beginning to look like I won't get the 'Tonight Show!'"
In 1993 the Tonight show gig went to Jay Leno instead of Letterman, a slight he never forgot or forgave.
Ten stars from Steve Martin to Tina Fey delivered the final Top Ten list of "Things I've always wanted to say to Dave." Julia Louis-Dreyfus, with Jerry Seinfeld standing nearby, said, "Thanks for letting me take part in another hugely disappointing series finale."
Tap to watch if you're viewing on the news app.
Number One was Bill Murray: "Dave, I'll never have the money I owe you."
Letterman, whose wife Regina and son Harry were in the audience, was serenaded at the end by the band Foo Fighters. They sang, "Everlong," the same song they played when he returned following heart surgery in February 2000.
Several audience members who filed out of the theater after the show had tears in their eyes.
"You could see his emotion," said John Bernstein, who flew in from Los Angeles to see the finale. "But I think he's feeling a lot more than he's showing."
Stephen Colbert will take over Late Show hosting duties in September.
Rival Jimmy Kimmel paid tribute to Letterman by not making a fresh ABC show on Wednesday, where he usually competes in the same time slot.
NBC's Jimmy Fallon opened his Wednesday monologue by saying: "I want to thank you for watching this on your DVR after you watched Letterman," while TBS's Conan O'Brien marked the beginning of Letterman's time slot by urging viewers to "Turn on Dave!"
The Associated Press contributed to this report.