Though Hamill admitted the reveal of his character was a "neat trick", he read his script for upcoming eighth movie The Last Jedi from the final pages to ensure it wouldn't be happening again.
The actor was particularly upset because he had been through "torture" to lose weight for the return of the franchise, and claims he was far more committed than his co-star, the late Carrie Fisher.
He told the Sunday Times: "I lost roughly 50lb [22.6kg] in weight. It was torture. I never missed a session, not like some people - ahem, Carrie Fisher.
"I went to the gym, they went to her house. She'd had all this equipment installed. Sometimes they'd come and she'd say, 'Oh, I forgot, it's today. Not today.' And she'd close the door.
"Only Carrie could get away with that."
While Hamill is best known for his Star Wars role, he insists it's only once proven to be a drawback in his career.
He said: "I could have done Amadeus the film. Milos Forman had me over to his suite. He was interviewing people to play Constanze, Mozart's wife, and I was in his suite from nine in the morning until six at night.
"At lunch I asked him flat out, 'Milos, why can't you consider me to play Mozart - because I've done it on Broadway?' He said, 'Oh, Mark, no one is to be believing that Luke Skywalker is Mozart'."
But the actor doesn't believe he was held back because of his Jedi alter ego.
He insisted: "I don't see Luke dominating my career. It just doesn't bother me, because I didn't expect to be remembered for anything.
"I wanted to be a character actor, and about all the best character actors, people say, 'Oh, that guy, I can't remember his name.'
"Look at Richard Riehle. He is as solid as it gets, always word-perfect. He knows his lines and he knows yours. He is the most incredibly versatile actor.
"Those are the people I really admire."
- Bang! Showbiz
To get the day's top stories in your inbox, sign up to our newsletter here.