Zadok (Hebrew: צדוק Tsadoq, meaning "Righteous") or Zadoq is a legendary priest, said to be descended from Eleazar the son of Aaron (1 Chron 6:4-8). He aided King David during the revolt of his son Absalom and was subsequently instrumental in bringing King Solomon to the throne. After Solomon's building of The First Temple in Jerusalem, Zadok was the first High Priest to serve there.
The prophet Ezekiel extols the sons of Zadok as staunch opponents of paganism during the era of pagan worship and indicates their birthright to unique duties and privileges in the future temple (Ezekiel 44:15, 43:19).
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.