Lee Mack has revealed that the Duke of Cambridge once grumbled that he needed a new collection of gags.
The Not Going Out star said he hit back by telling his royal critic that he did not offer him tips about how to be a king.
Lee revealed the jokey encounter - which took place at Buckingham Palace - during an interview for BBC One's The Graham Norton Show to be screened on Friday (January 24).
The comic said of the meeting with Prince William: "That was a bit of highlight. We got to go to the Palace, which was very exciting and he came up to me and said, 'You need some new jokes.'
"I was a bit drunk and said, 'I don't tell you how to be a future king,' to which he said, 'I was joking, I really like your sitcom.' I felt a bit bad then."
Fellow guest Sir Kenneth Branagh also talked about his own recent visit to the Palace as he collected his knighthood, telling Graham he was nervous about stepping on a corgi.
"We had an amazing day - going to Buckingham Palace is quite something - but I was terrified," he said. "Terrified of stepping on dogs, the corgis are everywhere, so I was quite nervous of kneeling on one."
Sir Kenneth said he has no recollection of his conversation with the Queen.
"I have no idea, I was so nervous. It was a kind of dream and I couldn't believe it was happening. I was just thrilled that I managed to stand up."
:: The Graham Norton Show is screened on Friday on BBC One at 10.35pm.