The source for the name Beelzebub is in 2 Kings 1:2-3, 6, 16. Ba‘al Zəbûb is variously understood to mean "lord of the flies" or "lord of the (heavenly) dwelling". Originally the name of a Philistine god, Ba'al, meaning "Lord" in Ugaritic, was used in conjunction with a descriptive name of a specific god. The Septuagint renders the name as Baalzebub (βααλζεβούβ) and as Baal muian (βααλ μυιαν, "Baal of flies"), but Symmachus the Ebionite may have reflected a tradition of its offensive ancient name when he rendered it as Beelzeboul.
In regard to the god of Ekron, the belief that zebub may be the original affix to Baal and that it is a substitute for an original zbl which, after the discoveries of Ras Shamra, has been connected with the title of "prince", frequently attributed to Baal in mythological texts. Ba'al Zebub was used in Hebrew as a pun with Ba'al Zebul, where Zebul meant "of the manor," and in a derogatory manner Ba'al Zebub was used to offend the enemies of the Israelites. In addition to this last position, which is not supported by the versions, is the fact that it was long ago suggested that there was a relationship between the Philistine god, and cults of flies - referring to a view of them as pests, feasting on excrement - appearing in the Hellenic world, such as Zeus Apomyios or Myiagros.  It is exactly this last connection which is confirmed by the Ugaritic text when we examine how Baal affects the expulsion of the flies which are the patient's sickness. According to Francesco Saracino (1982) this series of elements may be inconclusive as evidence, but the fact that in relationship to Baal Zebub, the two constituent terms are here linked, joined by a function (ndy) that is typical of some divinities attested in the Mediterranean world, is a strong argument in favor of the authenticity of the name of the god of Ekron, and of his possible therapeutic activities, which are implicit in 2 Kings 1:2-3, etc.
In the Testament of Solomon, Beelzebul (not Beelzebub) appears as prince of the demons and says (6.2) that he was formerly a leading heavenly angel who was (6.7) associated with the star Hesperus (which is the normal Greek name for the planet Venus (Αφροδíτη) as evening star). Seemingly, Beelzebul here is simply Lucifer. Beelzebul claims to cause destruction through tyrants, to cause demons to be worshipped among men, to excite priests to lust, to cause jealousies in cities and murders, and to bring on war. The Testament of Solomon is an Old Testament pseudepigraphical work, purportedly written by King Solomon, in which Solomon mostly describes particular demons whom he enslaved to help build the temple, with substantial Christian interpolations.
In Mark 3:22, the scribes accuse Jesus of driving out demons by the power of Beelzebul, prince of demons, the name also appearing in the expanded version in Matthew 12:24,27 and Luke 11:15, 18–19. The name also occurs in Matthew 10:25.
Jesus knew their thoughts and said to them, Every kingdom divided against itself will be ruined, and every city or household divided against itself will not stand. If Satan drives out Satan, he is divided against himself. How then can his kingdom stand? And if I drive out demons by Beelzebul, by whom do your people drive them out? So then, they will be your judges. But if I drive out demons by the Spirit of God, then the kingdom of God has come upon you.—Matthew 12:25-28
It is unknown whether Symmachus was correct in identifying these names, because we otherwise know nothing about either of them. Zeboul might derive from a slurred pronunciation of zebûb; from zebel, a word used to mean "dung" in the Targums; or from Hebrew zebûl found in 1 Kings 8:13 in the phrase bêt-zebûl, "lofty house".
In any case, the form Beelzebub was substituted for Beelzeboul in the Syriac translation and Latin Vulgate translation of the gospels, and this substitution was repeated in the King James Version of the Bible, the resulting form Beelzeboul being mostly unknown to Western European and descendant cultures until some more recent translations restored it.
Beelzebub is also identified in the New Testament as the devil, "prince of the demons". Biblical scholar Thomas Kelly Cheyne suggested that it might be a derogatory corruption of Ba‘al Zəbûl, "Lord of the High Place" (i.e., Heaven) or "High Lord".
In Arabic translations, the name is rendered as Baʿlzabūl (بعلزبول).
Texts of the Acts of Pilate (also known as the Gospel of Nicodemus) vary; they use Beelzebul or Beelzebub. The name is used by Hades as a secondary name for the Devil, but it may vary with each translation of the text; other versions give the name Beelzebub as Beelzebub, but separates him from the devil.
Beelzebub is commonly described as placed high in Hell's hierarchy. According to the stories of the 16th-century occultist Johann Weyer, Beelzebub led a successful revolt against the Devil, is the chief lieutenant of Lucifer, the Emperor of Hell, and presides over the Order of the Fly. Similarly, the 17th-century exorcist Sebastien Michaelis, in his Admirable History (1612), placed Beelzebub among the three most prominent fallen angels, the other two being Lucifer and Leviathan, whereas two 18th-century works identified an unholy trinity consisting of Beelzebub, Lucifer, and Astaroth. John Milton featured Beelzebub seemingly as the second-ranking of the many fallen cherubim in the epic poem Paradise Lost, first published in 1667. Milton wrote of Beelzebub, "than whom, Satan except, none higher sat." Beelzebub is also a character in John Bunyan's The Pilgrim's Progress, first published in 1678.
Sebastien Michaelis associated Beelzebub with the deadly sin of pride. However, according to Peter Binsfeld, Beelzebub was the demon of gluttony, one of the other seven deadly sins, whereas Francis Barrett asserted that Beelzebub was the prince of false gods.
Within religious circles, the accusation of demon possession has been used as both an insult and an attempt to categorise unexplained behavior. Not only had the Pharisees disparagingly accused Jesus of using Beelzebub's demonic powers to heal people (Luke 11:14–26), but others have been labeled possessed for acts of an extreme nature. Down through history, Beelzebub has been held responsible for many cases of demon possession, such as that of Sister Madeleine de Demandolx de la Palud, Aix-en-Provence in 1611, whose relationship with Father Jean-Baptiste Gaufridi led not only to countless traumatic events at the hands of her inquisitors but also to the torture and execution of that "bewitcher of young nuns", Gaufridi himself. Beelzebub was also imagined to be sowing his influence in Salem, Massachusetts: his name came up repeatedly during the Salem witch trials, the last large-scale public expression of witch hysteria in North America or Europe, and afterwards, Rev. Cotton Mather wrote a pamphlet entitled Of Beelzebub and his Plot.
The name Baʿal Zəvûv (Hebrew: בעל זבוב) is found in Melachim II 1:2-3, 6, 16, where King Ahaziah of Israel, after seriously injuring himself in a fall, sends messengers to inquire of Ba‘al Zebûb, the god of the Philistine city of Ekron, to learn if he will recover.
Now Ahaziah fell through the lattice in his upper chamber that was in Samaria, and he became ill; and he sent messengers and said to them, "Go inquire of Baal-zebub, the god of Ekron, whether I will recover from this illness."
Elijah the Prophet then condemns Ahaziah to die by God's words because Ahaziah sought counsel from Ba‘al Zebûb rather than from God.
But an angel of the Lord spoke to Elijah the Tishbite [saying], "Arise, go up toward the king of Samaria's messengers, and speak to them, [saying], 'Is it because there is no God in Israel, that you go to inquire of Baal-zebub the god of Ekron? Therefore, so has the Lord said, "From the bed upon which you have ascended you will not descend, for you shall die." ' " And Elijah went.
Rabbinical literature commentary equates Baal Zebub of Ekron as lord of the "fly". The word Ba‘al Zebûb in rabbinical texts is a mockery of the Ba'al religion, which ancient Hebrews considered to be idol worship.
Jewish scholars have interpreted the title of "Lord of Flies" as the Hebrew way of calling Ba'al a pile of dung and comparing Ba'al followers to flies.