"It's been an incredible opportunity to pilot this wonderful franchise," Stewart said at the close of the episode. "Seventeen years is the longest I have ever in my life held a job, by 16 years and five months ... In my heart, I know it is time for someone else to have that opportunity."
The announcement drew gasps from the audience, as well as applause, as Stewart fought back his emotions. He called his role with the show "the honor of my professional life."
Stewart, 52, began hosting "The Daily Show" in 1999, making fun of the news in a way that caught the imagination of a generation of younger viewers. His show mixes comedy correspondent stories with interviews of celebrities and newsmakers, with the goal of eliciting laughs but also making cogent points about politics, newsmakers and the media.
After Stewart made his announcement during the taping, the show teased the development on social media.
"Through his unique voice and vision, The Daily Show has become a cultural touchstone for millions of fans and an unparalleled platform for political comedy that will endure for years to come," Comedy Central said in a statement. "Jon will remain at the held of The Daily Show until later this year."
Stewart took a hiatus from hosting "The Daily Show" over the summer of 2013 to direct his first feature film, titled "Rosewater," which came out this year.
From their fake news desk, "The Daily Show" and Stewart have won 19 Emmy awards as well as a Grammy.
Stewart began his career on the comedy club circuit and in the early '90s gained a wider audience through appearances on "Late Night With David Letterman." In 1993, he began a successful talk show on MTV.
Stewart told Bill O'Reilly in 2008 that "The Daily Show" had no intentional political agenda beyond "schnicks and giggles." And over the years he has skewered both Republican and Democratic figures with equal zeal.