The star, who said he had done a similar impression on a Monty Python show, said he was "blacklisting myself before someone else does".
It came after The Cambridge Union said art historian Andrew Graham-Dixon would not be invited back.
Union president Keir Bradwell said Cleese's withdrawal was a "huge shame".
On Twitter Cleese apologised to union members and said: "I was looking forward to talking to students at the Cambridge Union this Friday, but I hear that someone there has been blacklisted for doing an impersonation of Hitler.
"I regret that I did the same on a Monty Python show, so I am blacklisting myself before someone else does.
"I apologise to anyone at Cambridge who was hoping to talk with me, but perhaps some of you can find a venue where woke rules do not apply."
The PA news agency understands Cleese was due to visit the University of Cambridge as part of a documentary he is making on "woke culture".
Mr Bradwell said it was a "huge shame" that Mr Cleese felt he could no longer attend, but that his "blacklist" was merely a recommendation to future presidents.
"We were really looking forward to hosting John here," he said.
"It would have been a really fantastic event and our members are really excited to hear from him; the documentary he is making is extremely topical.
"We very much hope that we will be able to host him at some point... he's the kind of speaker that would thrive with our audience and in our room.
"It's a huge shame has withdrawn but we're hoping to resolve the situation as soon as possible."
Mr Graham-Dixon declined to comment on Cleese's withdrawal, but on Monday issued an apology for any offence caused by his parody, saying he had been trying to persuade the audience "that bad taste and bad morality often go hand-in-hand".
"The speech I gave was a strident attack on Hitler's racism and anti-Semitism," he said.
"I apologise sincerely to anyone who found my debating tactics and use of Hitler's own language distressing; on reflection I can see that some of the words I used, even in quotation, are inherently offensive."