A host of stars joined him for the final show, including the singer Bruce Springsteen.
There were also video messages from US Secretary of State John Kerry and Republican Senator John McCain.
Stewart took over the show in 1999 and established himself as one of the most influential satirists in the US and the voice of liberal America.
He is being replaced by the South African comedian Trevor Noah.
The Daily Show, broadcast on Comedy Central, has often been cited as a leading news source for young people, with an average audience of one million viewers.
In his final monologue, Stewart thanked colleagues, fans and family.
"Nothing ends. It's just a continuation. It's a pause in the conversation," he said.
"So rather than saying goodbye or good night, I'm just going to say I'm gonna go get a drink," he said.
The Daily Show has also helped to launch several well-known comic performers, including Steve Carell and John Oliver, as well as Stephen Colbert who is to be David Letterman's replacement on CBS's Late Show.
The hashtag #JonVoyage was trending on Twitter as Stewart bid farewell to the Daily Show, with famous fans paying tribute.
For John McCain, it was a chance for a spot of gentle revenge. Stewart had once mocked him using a puppet resembling the Republican senator.
Comedian Jon Stewart has hosted his final broadcast of the satirical US news programme The Daily Show.