"I feel the love and I thank you for it," Winfrey told the crowd at Chicago's United Center. "Thank you for being a part of this great night, this celebration of what you have done for `The Oprah Winfrey Show.' You have made it possible for us to stand for 25 years."
SEND IN YOUR OPRAH MEMORIES! SEND YOUR VIDEOS HERE! Tom Hanks and then Tom Cruise greeted Winfrey after she came on stage to a standing ovation from the audience of 13,000 gathered for "Surprise Oprah! A Farewell Spectacular." Josh Groban and Patti LaBelle sang "Somewhere Over the Rainbow" as Winfrey sat in a white chair onstage.
"Was that not the coolest?" Winfrey said when they finished. She announced in November 2009 that she would end her popular talk show after 25 years.
Madonna said she is among the millions of people who are inspired by Winfrey.
"She fights for things she believes in, even if it makes her unpopular," Madonna said.
The taping of the second show began with Will Smith and his wife, Jada Pinkett Smith, who thanked Winfrey and told her she mothered millions and "that puts you in the status of a goddess."
Michael Jordan, who led the Chicago Bulls to six NBA championships during the 1990s, came on stage to hug Winfrey and tell her he loves her and she inspired him.
Jamie Foxx and Stevie Wonder sang "Isn't She Lovely" to Winfrey. Wonder followed with his own song, singing to her, "Oprah thank you for using your gifts to uplift so many hearts."
Simon Cowell made an appearance, Rosie O'Donnell sang a Broadway-style song and Jerry Seinfeld did a comedy routine.
Maria Shriver, the TV journalist and Kennedy heiress, appeared on the same day it was revealed her husband, Arnold Schwarzenegger, fathered a child with a woman on his household staff more than a decade ago. Shriver did not mention her husband during the taping. "You have given me love, support, wisdom and most of all the truth," Shriver told Winfrey. "And I know I'm not alone in receiving those gifts from you."
Grammy winner John Legend was beamed in from a school in New Orleans, and actress Dakota Fanning led a group of children talking about Winfrey's influence on their live.
"You always had the power, and that is the message you brought into our lives," Cruise told Winfrey.
Halle Berry, Queen Latifah, Katie Holmes and Diane Sawyer were there too. Beyonce sang her song "Run the World (Girls)" backed by dozens of dancers. Rascal Flatts performed too.
"Oprah Winfrey because of you women everywhere have graduated to a new level of understanding of who we are, of what we are and most of all who we can be," Beyonce said before starting her performance.
The stadium was decorated with pictures of Winfrey at seminal moments over the course of her talk show. Boxes of tissues were on scattered seats throughout the audience.
Before the taping, the guest lineup for "Surprise Oprah! A Farewell Spectacular" was a secret, but the show quickly delivered on promises from Winfrey's producers that the biggest names in Hollywood would be there.
Tuesday's taping will air May 23 and 24, before Winfrey's final show on May 25.
Harpo Productions received more than 154,000 ticket requests for seats to Tuesday's event. Tickets were free and distributed to fans through a lottery.
Winfrey also received messages from some not-so-famous admirers. Female American soldiers gave a taped message from Iraq and three female fans from countries around the world came on stage.
Scholarship recipients from Morehouse College walked along the United Center aisles as Kristen Chenoweth sang "For Good" from the musical "Wicked."
Fans started lining up outside hours before the taping started. Cathy Deters, 52, of Cincinnati, drove to Chicago without a ticket, but someone outside the stadium gave her one.
"I don't think anyone could replace Oprah Winfrey," said Deters, an energy broker. "Not many people will have the chance to experience this."
Celebrities such as Lisa Ling, Carson Kressley, Jessica Seinfeld, Ally Wentworth, Bob Greene and former Chicago Mayor Richard Daley sat in the audience.
The content of the final episode of "The Oprah Winfrey Show" is still under wraps.
AP reporter Alicia Rancilio contributed to this report.