Beelzebub comes, via the Latin Bible, from Hebrew ba’al z’vuv, literally “Lord [or Ba’al] of the Fly.” (Most people know this phrase better as “Lord of the Flies” from the title of William Golding’s best-selling 1954 novel, but in the Bible, z’vuv, “fly,” is in the singular.) Ba’al was the ancient Canaanite sky god and the senior figure in the Canaanite pantheon, and Ba’al Z’vuv is mentioned in the first chapter of Kings II as the name of a Philistine deity who was worshipped by some Israelites, too. Kings disapprovingly narrates (in the King James translation) what happened when the Israelite king Ahaziah fell ill: “He sent messengers and said unto them, ‘Go, inquire of Baal-Zebub, the god of [the Philistine city of] Ekron, whether I shall recover of this disease.”The phrase zbl bʻl seems to mean "Prince Baal" in Ugaritic. Outside of the Synoptic Gospels there is no other surviving ancient Jewish use of the term Beelzeboul as the name of a demon, but the Symmachus Greek translation of the passage in 2 Kings 1 does preserve the more ancient form of the name, ba’al z’vul, so it was still known as the name of a Canaanite god in the time of Jesus. The jump from that to the name of a chief demon would not have been great in the worldview of Second Temple era Jews.
Although some scholars have argued that flies were indeed associated with this god, the name ba’al z’vuv is far more likely to be a jeering pun on the Canaanite ba’al z’vul, “Lord of the Heavens.” This seems clear from the Greek New Testament, where the name occurs several times as Beelzeboul. (This is also an interesting indication of the lateness of the final editing of some parts of the Hebrew Bible, since ba’al z’vul rather than ba’al z’vuv was obviously still common usage in late Second Temple times.) As a chief rival of the God of the Israelites, Ba’al is the object of similar thrusts elsewhere in the Bible as well. Whereas, for example, Saul’s son Jonathan, so we read in the book of Chronicles, named his own son Meriv-Ba’al, “Warrior of Ba’al,” the book of Samuel refers to him as Mephiboshet, probably from pid, “misfortune,” plus boshet, “shame.”
The essay also mentions the use of Beelzeboul as a demonic name in the Testament of Solomon, but this is clearly dependent on the Synoptic Gospels.