We have studied different generations of pyrite (Py-I, II and III) and sphalerite (Sph-I, II and III), associated with ore mineralization and remobilization stages, from both the deposits. In Rajpura-Dariba, high concentrations of the majority of trace elements in syngenetic Py-I and Sph-I suggest their formation from trace element enriched hydrothermal fluid in SEDEX environment. Enrichment of lattice bound elements in Py-II (As, Co, Ni) and Sph-II (Mn, Hg and Cd) during metamorphic recrystallization of early pyrite and sphalerite indicates their local derivation from host rocks. The Pb, Tl, Ag and Sb rich Py-III and Sph-III in discordant ore indicate their crystallization from low melting-point chalcophile elements enriched sulfide melt. In Zawarmala, the trace element poor natures of diagenetic banded Py-I and Sph-I suggest that the initial ore-forming fluid was depleted in trace elements. Enrichment of trace elements in Py-II (As, Mn, Tl, Cu) and Sph-II (Mn, Hg, As, Ga) in sphalerite-pyrite vein ore signify their derivation from carbonate host rocks. The high abundance of trace elements in Py-III and Sph-III indicates their precipitation at lower temperatures from a trace element enriched hydrothermal fluid during the massive galenasphalerite ore formation. Pyrite and sphalerite from global SEDEX are trace elements enriched as compared to MVT deposits, where their compositions have remarkably correlation with host rocks. Our study highlights the influence of host rock in pyrite and sphalerite compositions and their ore genetic implications.