The Scottish actor, 37, was promoting his latest film, the sex thriller Deception, when he revealed on the BBC that he was forced to have a suspicious-looking facial mole – one of several – removed from just below his right eye.
"You have to be careful if you're pale-skinned and spend any time in the sun," McGregor said. "I went to see a specialist who thought they were better to be removed, and indeed he was correct."
He advised others similarly at risk that it "was best to be looked at" by doctors.
Was the Star Wars Obi Wan star jolted by his experience? As he sarcastically replied, "It was great fun having skin cancer, it was great. I really enjoyed it."
On March 25, CNN newsman Anderson Cooper revealed a similar scare, when he wrote on his network's blog: "I had minor surgery on Monday. A small spot of skin cancer was removed from under my left eye. I hadn't planned on mentioning this, but I still have stitches and you'll no doubt notice."
As dermatologists have increasingly warned, using a strong sunscreen is vital to survival. The American Cancer Society estimates that this year alone, there will be will be 62,480 new cases of melanoma in the U.S. The disease will also claim the lives of about 8,420 people in 2008.
Only last week, Bruce Springsteen's E Street Bandmate Danny Federici, 58, died of melanoma, after a three-year battle.