John IV of Naples should not be confused with John IV (bishop of Naples).
John IV was the mostly absentee duke of Naples from 997 to after 1002. He was the son and successor of Sergius III. John IV originally recognised the suzerainty of the Byzantine Emperor.
In 999, he was captured and taken a prisoner first to Capua, then back to Germany by Otto III, the Holy Roman Emperor, who had just visited Saint Nilus the Younger in Gaeta. During his absence, Naples seems to have continued in allegiance to the Greeks, though it was technically governed by Adhemar of Spoleto. In 1002, John reappears in his duchy, probably released by Otto's successor, Henry II.
John had one son, Sergius, who succeeded him, and two daughters. The elder was Sichelgaita (whose name may imply that John had a Lombard wife), who married John IV of Gaeta and thus cemented alliance between her brother and Duke John V of Gaeta. A second daughter is recorded unnamed by Amatus of Montecassino as having been widowed by the count of Gaeta and remarrying soon after to Ranulf Drengot, the Norman count of Aversa. This latter account is confusing, but not impossible.