Myers, who provided the voice of the ogre Shrek in the animated film series, which he played with a Scottish accent, said he hoped Scotland would “remain part of Britain”.
Interviewed on BBC Radio 4’s Today programme, he was initially reluctant to express a view on the issue but, pressed on what Shrek would say, he replied in the voice of the character: “Shrek wants what the will of the Scottish people want.”
He then added in his own accent: “I love Scotland. I hope they remain part of Britain – and if they don’t, I still love them.”
Other celebrities who have urged Scots to stay in the UK – such as David Bowie and JK Rowling – have found themselves the target of online abuse from independence supporters.
A spokesman for the pro-UK Better Together campaign said: “It’s no surprise Mike Myers doesn’t support separation. He knows a fairytale when he sees one.”
Asked whether David Cameron welcomed Shrek’s opposition to Scottish separation, a senior Downing Street source said: “The Prime Minister welcomes all support for the United Kingdom.”
A spokesman for the pro-independence Yes Scotland campaign said: “As Mike Myers said, he can’t answer for Shrek – the cuddly ogre wants whatever the will of the Scottish people is, and we plan to make the No campaign green with envy by achieving a Yes vote in September. The news comes as today the Prime Minister calls on the “silent majority” of Scots who support the UK to make their voices heard in the run up to the independence referendum.
David Cameron is travelling to Scotland to again make the case for the country remaining in the UK.