The Haerdaban Pb–Zn deposit, located in the eastern West Tianshan Orogen, hosts stratiform and vein-type mineralization within Precambrian carbonate rocks. However, there has been limited research on the distinctions and relationships between these two mineralization styles. In this study, we compared trace element distributions, fluid conditions, material sources, and mineralization ages between stratiform and vein-type mineralization and reconstructed a detailed genetic model. Two episodes and four stages of mineralization were identified, including five generations of pyrite and two generations of sphalerite. The sedimentary exhalative episode represents stratiform mineralization including Stage I pyrite–pyrrhotite layers (Py-1, Py-2a, Py-2b, and Py-3) and Stage II sphalerite–galena layers (Sph-1). The magmatic–hydrothermal episode represents vein-type mineralization including Stage III pyrite–quartz–calcite veins (Py-4) and Stage IV sphalerite–galena–quartz–calcite veins (Sph-2). LA–ICP–MS analysis of Se–Co–Ni–As–Ag–Sb–Bi contents in pyrite suggests that Py-1 to Py-3 formed under relatively low temperatures (280 ± 8 °C) and high ƒO2 sedimentary conditions. Py-4 formed under relatively high temperatures (339 ± 18 °C) and low ƒO2 hydrothermal conditions. Variations in Fe–Mn–In–Ga–Ge–Cd–Cu contents in sphalerite indicate that Sph-1 formed under relatively low temperature (211 ± 7 °C), intermediate ƒS2 (logƒS2 = −11.1 ± 0.5), and moderate pH sedimentary exhalative conditions. Sph-2 formed under relatively high temperature (292 ± 5 °C), high ƒS2 (logƒS2 = −7.4 ± 0.2), and low pH hydrothermal conditions. In situ analysis of sulfide S–Pb suggests that ore-forming materials for stratiform mineralization were primarily derived from marine sediments, while those for vein-type mineralization primarily originated from magmatic sources. Sph-1 from stratiform mineralization yielded an Rb–Sr isochron age of 719 ± 16 Ma, while Sph-2 from vein-type mineralization exhibited an Rb–Sr isochron age of 380.3 ± 7.7 Ma. Random Forest classification of trace elements in pyrite and sphalerite predicted that stratiform mineralization is of sedimentary genesis, whereas vein-type mineralization is of magmatic–hydrothermal genesis. Based on our results, we identified a two-episode mineralization history for the Haerdaban Pb–Zn deposit: Neoproterozoic syngenetic sedimentary exhalative mineralization overprinted by Devonian epigenetic magmatic–hydrothermal mineralization. The results of this study highlight the importance of considering multiple geological events in ore-forming processes and will facilitate the exploration of similar deposits in the West Tianshan Orogen.