Freddie Mercury wrote the lyrics, and there has been a lot of speculation as to their meaning. Many of the words appear in the Qu’ran. «Bismillah» is one of these and it literally means «In the name of Allah.» The word «Scaramouch» means «A stock character that appears as a boastful coward.» «Beelzebub» is one of the many names given to The Devil.
Mercury’s parents were deeply involved in Zoroastrianism, and these Arabic words do have a meaning in that religion. His family grew up in Zanzibar, but was forced out by government upheaval in 1964 and they moved to England. Some of the lyrics could be about leaving his homeland behind. Guitarist Brian May seemed to suggest this when he said in an interview about the song: «Freddie was a very complex person: flippant and funny on the surface, but he concealed insecurities and problems in squaring up his life with his childhood. He never explained the lyrics, but I think he put a lot of himself into that song.»
Another explanation is not to do with Mercury’s childhood, but his sexuality – it was around this time that he was starting to come to terms with his bisexuality, and his relationship with Mary Austin was falling apart.
Whatever the meaning is, we may never know – Mercury himself remained tight-lipped, and the band agreed not to reveal anything about the meaning. Mercury himself stated, «It’s one of those songs which has such a fantasy feel about it. I think people should just listen to it, think about it, and then make up their own minds as to what it says to them.» He also claimed that the lyrics were nothing more than «Random rhyming nonsense» when asked about it by his friend Kenny Everett, who was a London DJ.
source: song fact