The Bible states that Zadok was a patrilineal descendant of Eleazar the son of Aaron the high priest.(2 Samuel 8:17; 1 Chronicles 24:3) The lineage of Zadok is presented in the genealogy of Ezra (his descendant) as being of ninth generation of direct patrilineal descent from Phineas the son of Eleazar; Ezra 7:1, see 1 Chronicles 5:30 where he is placed ninth in descent from Phineas.
...Zadok, The son of Ahitub, son of Amaryah, son of Azaryah, son of Mirayoth, son of Zerachyah, son of Uzzi, son of Bukki, son of Avishua, son of Phineas
In chronological order, Zadok is first mentioned as coming to support David at Hebron. During the rebellion of Absalom, Zadok is mentioned, as he and the Levites wished to accompany the fleeing David and bring along the Ark of the Covenant, but the king instructed them to remain at Jerusalem, where they could do him better service, so that it actually happened that Ahimaaz, the son of Zadok, along with Jonathan, the son of Abiathar, brought the fleeing king a life saving message. In all these passages Zadok is mentioned in precedence to Abiathar.
Both Zadok and Abiathar were functioning in tandem as high priests at the time of David's hasty exit from Jerusalem. But, when King David sought advice from the Urim and Thummim by way of Abiathar a divine response was not given, leading to his dismissal from high-priesthood. Subsequently, when Adonijah endeavoured to secure the throne, Abiathar sided with him, leading king Solomon (David's son) to expel him from Jerusalem and reinforce the sole high-priesthood of Zadok, who, along with Nathan the Prophet, supported King Solomon's accession to throne.
According to 1 Kings 1:39, Zadok officiated at the anointing ceremony of Solomon as king.
The Hebrew Bible records how before his death, Aaron was accompanied by his brother Moses and his sons Elazar and Ithamar. Upon entry to the cave where he was to die, Aaron saw his brother Moses dress his elder son Elazer with the clothes of the high priesthood, as initiation to high priesthood. Jewish commentaries on the Bible say that this initiation ceremony served as the catalyst for the stipulation that all future candidates of high priesthood be patrilineal descendants of Elazar the elder son of Aaron and not Ithamar, the younger son.
Similarly, the Hebrew Bible relates how, at the time Phineas son of Eleazar appeased God's anger, he merited the divine blessing of God:
Phineas the son of Eleazar the son of Aaron the priest..Behold I give to him my covenant of peace, and will be his, and his progeny after him, (a) covenant of everlasting priesthood in turn of his zealousness for his God, and he atoned for the sons of Israel
In addition, The Tanakh (i.e., Hebrew Bible) records
And you Moses bring forward your brother Aaron, and his sons, from among the children of Israel to serve as priests to Me - Aaron, Nadab, and Abihu, ELAZAR, and Ithamar, the sons of Aaron. . .
The Dead Sea Scrolls portray a central role for 'the sons of Zadok the Priest' within the community; the 'Teacher of Righteousness' (Moreh Zedek) named as founder may point to a Zadokite. while the phrase "To be as one in following the Law and (sharing) wealth and reconcilling (based on) the mouth of the sons of Tzadok the keepers of the covenant" from the Community Rule document suggest that the leaders of the community were sons of Zadok.
Rabbinical commentators explain that the continuity of high priesthood is put forth to the descendants of Phineas from this noted verse. According to some rabbinical commentators Phineas sinned due to his not availing his servitude of Torah instruction to the masses at the time leading up to the Battle of Gibeah. In addition, he also failed to address the needs of relieving Jephthah of his vow. As consequence, the high priesthood was taken from him and given (temporarily, see next section) to the offspring of Ithamar, essentially Eli and his sons.
Upon the sin of Eli's sons, Hophni and Phinehas, it was prophesied that the high priesthood would be returned to the sons of Eleazar:
And I will raise up myself a reliable priest who acts with my heart, and with my soul he will do, and I will build him a reliable household, and he will go before my Anointed for all of days
A number of scholars indicate that Zadok was the subject of the prophecy of Elkanah when Zadok, said to be of the progeny of Eleazar, was ultimately appointed as high priest.
Zadok, as a patrilineal descendant of Phinehas (son of Elazar) assumed the high priesthood. His sons were Ahimaaz and Azariah followed by his descendants who held the high priesthood up to the destruction of The First Temple and, following the building of the second temple, resumed the high priesthood, as per Joshua the High Priest (along with Ezra) being of Zadokite lineage.
The attempt to trace his genealogy back to Eleazar, the third son of Aaron, as opposed to Abiathar, his contemporary and colleague, who was regarded as a descendant of Eli and considered a member of the house of Ithamar, was first made by the Chronicler (I Chronicles 5:30-34 [A. V. vi. 4-8]; comp. 6:35-38 [A. V. 6:50-53]), thus assuring the preeminence of the Zadokites over the descendants of Eli. In the beginning of his career he was associated with Abiathar (2 Samuel 20:25) and with his son (ib. 8:17; I Chron. 24:3, 6, 31). The hypothesis has accordingly been advanced that Zadok officiated in the Tabernacle at Gibeon (I Chron. 16:39; comp. I Kings 3:4), while the sons of Eli were stationed as high priests at Jerusalem or, more probably, at Shiloh (compare Keil on I Kings 1:8) Such a division of functions is very doubtful, however; and it is more plausible to suppose that Zadok gradually won equality of rank with the sons of Eli by his good fortune in gaining the favor of David.
According to the Chronicler, a certain Zadok, as a young man, had been one of those who joined David at Hebron and helped him win the crown of all Israel, his house then including twenty-two captains; (I Chron 12:29) and Josephus expressly identifies this Zadok with the high priest of the same name (Antiquities of the Jews 7:2, § 2).
According to the Masoretic Hebrew text, David addressed the priest with the words "ha-Kohen ha-ro'eh attah," ("You are the seer-priest") (II Sam. 15:27) and the Vulgate consequently regards Zadok as a seer, although this interpretation is regarded by many scholars as incorrect. These two difficult words are emended by Wellhausen to "ha-Kohen ha-Rosh Atta" ("You are the chief priest"), thus implying the promise of the high-priesthood to him. On the suppression of the Absolom rebellion, the king sent Zadok and Abiathar to the elders of Judah, urging them to hasten to bring the monarch back (ib. 19:12) Zadok again manifested his loyalty to the next king when he espoused the cause of Solomon against Adonijah, (I Kings 1:8 et seq.) and in his gratitude Solomon appointed him sole high priest (ib. ii. 35). In his account of this event Josephus states (Antiquities 8,1, § 3) that Zadok was a scion of the house of Phinehas, and consequently a descendant of Eleazar.
Historical data show that the high-priesthood remained in the progeny of the Zadokites from the time of Zadok up until the rise of the Maccabees, in about 167 BCE. The descendants of Zadok increased in rank and influence, so that his son Azariah was one of the princes of Solomon,(1 Kings 4:2) and the Ahimaaz who married a daughter of Solomon was probably another of Zadok's sons (1 Kings 4:15) Either Zadok himself or his grandson was the ruler of the Aaronite priests (1 Chronicles 27:17), and Jerusha, the mother of Jotham, is apparently termed the daughter of Zadok to emphasize her noble lineage, since her father may have been a descendant of the first Zadok (2 Kings 15:33; 2 Chronicles 27:1).
The house of Zadok occupied the high priesthood through much of the Second Temple's time, from Jehoshua ben Jehozadak after the Exile, down to Simon II (Simon the Just, much praised in Ben Sira 50), his eldest son Onias III, and his usurping second son Jason (or Jehoshua), who introduced the programme of Hellenization that eventually led to the Maccabean Revolt.
Josephus records that Onias IV went to Leontopolis in the Egyptian nome of Heliopolis with a significant following, and for lending military support to the Ptolemaic Pharaoh was given land to build a temple to rival the Temple in Jerusalem (although Josephus also ascribes this to Onias III, while dating the project so as to suggest Onias II). It has been suggested that Onias or members of his Zadokite house may have also founded the community at Qumran.
Some have speculated that as Zadok does not appear in the text of Samuel until after the conquest of Jerusalem, he was actually a Jebusite priest co-opted into the Israelite state religion. Harvard Divinity School Professor Frank Moore Cross refers to this theory as the "Jebusite Hypothesis," criticizes it extensively, but terms it the dominant view among contemporary scholars, in Canaanite Myth and Hebrew Epic: Essays in the History of the Religion of Israel. Further support for the Jebusite Hypothesis may be drawn from Zadok's participation in the conspiracy among native Jerusalemites (i.e., Jebusites), including Nathan and Bathsheba, that displaced the non-Jerusalemite senior heir to King David's throne, Adonijah, in favor of Bathsheba's son Solomon (1 Kings 2:27, 35, 39), thus highjacking the throne and succession for the party of the conspirators.
Elsewhere in the Bible, the Jebusites are described in a manner that suggests that they worshipped the same God (El Elyon) as the Israelites, in the case of Melchizedek. Further support for this theory comes from the fact that other Jebusites or residents of pre-Israelite Jerusalem bore names invoking the principle or god Zedek (Tzedek) (see, for example, the names Melchizedek and Adonizedek). Under this theory the Aaronic lineage ascribed to Zadok is a later, anachronistic interpolation.
Zadok or Tzadok, pupil of Antigonus and possibly founder of the Sadducees, construed his teaching, "Be not like the servants who serve their masters for the sake of the wages, but be rather like those who serve without thought of receiving wages" to mean that there is no afterlife. This gives way to the Sadducee connection of Zadok the pupil of Antigonus of Sokho.
The popular founder of Reform Judaism, Abraham Geiger, was of the opinion that the Sadducee ("Tzadoki" in Mishnaic pronunciation) sect of Judaism drew their name from Zadok, with the leaders of the sect proposed as the sons of Zadok.
However, based on Chazalic sources, the origination of the Sadducee group initiated in tandem with the Boethusian group, with their founders, Zadok and Boethus, both being individual students of the Antigonus of Sokho, who preceded the Zugot era during the Second Temple period (Avoth deRabbi Nathan 5:2).
Chazalic literature took a dim view of both the Sadducees and Boethusian groups not only due to their perceived carefree approach to keeping to written Torah and oral Torah law, but also due to their attempts to persuade common-folk to join their ranks (Sifri to Deuteronomy)
Maimonides, in his treatise to Pirkei Avot, views the Sadducees as Gonvei Da'at ("stealers of knowledge") of the greater Jewish nation and of intentionally negating the Chazalic interpretation of Torah (Torah Shebal Peh Rambam to Avoth chap. 2). Likewise, in his Mishneh Torah treatise the Rambam defines the Sadducees as "Harming Israel and causing the nation to stray from following God" (Hilchoth Avodah Zarah 10:2).
Considering the lack of Chazalic documentary indicating a connection between Zadok the first high priest and Zadok the student of Antignos of Sokho, along with the 13 plus generations between the two Zadok's, Rabbinic figures tend to put a damper on that association. Additional aspects disproving that association include a Chazalic mention that the Sadducee and Boethusian groups favored using vessels of gold and silver whereas the common vessel usage of priests, to negate transmission of impurity, were typically of stone.
A Rabbi Zadok is also mentioned as saved in Talmud (Bavli Gittin 56B) by Yohanan ben Zakkai, when he makes his deal with Vespasian. This Zadok is part of the Tannaim teachers that assembled the Mishnah, or Oral Torah ultimately forming the Talmud. This Zadok is listed as Second Generation of five in the Tannaim teacher group, ultimately responsible for the Mishnah used today compiled by Judah I, or Judah the Prince.