The season two finale, called "The Rescue", premiered on the Disney+ streaming service on Friday (18Dec20), and [SPOILER ALERT!] featured a surprise appearance from a computer-generated image of Luke Skywalker - the character made famous on the big screen by Hamill.
The actor hinted at the cameo in a Twitter post on Friday, asking his followers, "Seen anything good on TV lately?"
He then followed it up with a more detailed post on Saturday, after the news hit headlines.
"The fact that we were able to keep my involvement a secret for over a year with no leaks is nothing less than a miracle," he marvelled. "A real triumph for spoiler-haters everywhere!"
Hamill is no stranger to "The Mandalorian" - he previously lent his voice to a droid bartender in season one's episode five, titled "The Gunslinger", although the small role was uncredited.
"The Mandalorian", created by director Jon Favreau, is set five years after the third film in the original George Lucas Star Wars trilogy, 1983's "Return of the Jedi", and stars Pedro Pascal as the titular bounty hunter.
Also in the final episode, Disney confirmed Boba Fett spin-off series. Called "The Book of Boba Fett", the project is scheduled to launch in December 2021 with Temuera Morrison expected to return as the titular role and Ming-Na Wen as Fennec Shand.