The crowds were so large that they shut down Hollywood Boulevard.
“There's a lot more people that showed up for my star!” Ford joked while at the event.
But he later got serious, remembering his and Hamill's late "Star Wars" co-star, Carrie Fisher, whose daughter Billie Lourd was also in attendance.
“When thinking about today, I was really sorry that we don't have the other member of our trio here to celebrate with us,” Ford said, to the cheers of the crowd. “But I feel her presence.”
When it was Hamill’s turn to speak, he was overcome with emotion.
“I haven't been this speechless since 'Force Awakens,'" he said, as the crowd laughed. Hamill famously did not have any lines in that film.
He went on to thank Lucas for giving him the opportunity to play the now-iconic hero, Luke Skywalker. He also thanked Ford by doing a spot-on impression of the actor, as Han Solo, giving him this piece of advice: “Hey kid, don’t get cocky.”
Finally, he thanked the fans for being with him throughout his long career, which has not only included the "Star Wars" franchise, but various voice-over roles in TV and video games. His most famous of those roles is perhaps the Joker in "Batman: The Animated Series."
“From Jedi to Joker, it’s been a fantastic ride. Thank you so much and may the Force be with each and every one of you,” he said, signing off with his famous Joker cackle.
ABC News' Andrea Tuccillo wrote this report.