The Permian Huangshanxi Ni–Cu-hosted intrusion, located in the southern Central Asian Orogenic Belt in NW China, is dominated by cumulus olivine and orthopyroxene. Various types of compositional zonings in cumulate phases were studied using high-resolution synchrotron X-Ray fluorescence imaging, electron microprobe, laser ablation inductively coupled plasma mass spectrometry and secondary ion mass spectrometry, to shed light on the relationship between the orthopyroxene-rich cumulate and sulfide accumulation. Normal, oscillatory, and sector zonings of Cr in orthopyroxene from both lherzolites and olivine websterites were noted, likely due to the different cut orientation of orthopyroxene crystals composed of sector-zoned cores and reverse-zoned rims. Significant Fe–Mg–Al–Si variations found in the exterior regions of the grains do not correspond to the Cr zoning. However, Cr content is positively correlated with Ti–Al contents in interior regions of orthopyroxene, reflecting coupled charge substitution during the development of sector zoning, and indicating diffusion-modified Fe–Mg–Al–Si variation in the exterior regions. Primary Cr-sector zoning in the core is likely the result of rapid in situ growth in a boundary layer at the cumulus stage, probably induced by Si addition from wall rocks and crystallization under supersaturated conditions. In addition, some olivine shows Mg–Fe–Mn–Ca–Cr variations in the rim but not in the core, and both core and rim of olivine show a uniform O isotope composition, illustrating that they have not been modified by post-cumulus processes. Given the distinct difference in O isotopic signatures between mantle-derived melts and crustal materials, olivine O isotope composition could be used to decipher the relative degree of Si addition at crystallization. The Fo value, O isotopic signature and trace element content in the cores of olivine grains from different depths show systematic variations, dividing the sulfide-bearing cumulate into two intervals; the lower and upper lherzolite zones with harzburgitic rocks at the contact. In the lower zone, the olivine δ 18 O values increase upward from ~ 6 to ~ 7‰ and the oxygen fugacity decreases from QFM to QFM-2, suggesting increasing contamination by more reduced crustal materials. Over the same interval, the modal proportion of orthopyroxene and modal orthopyroxene/olivine ratio increase with increasing depth with little variation in whole-rock Mg#, clearly illustrating that the non-cotectic orthopyroxene proportions resulted from Si addition from the wall rock. In the upper zone, the decrease in δ 18 O values, and increase in olivine nucleation density, Fo value and oxygen fugacity suggest there was a pulse of sulfide- and olivine-charged magma into the magma chamber, that mixed with resident magma to form a hybrid bottom layer in contact with the early-crystallized orthopyroxene-rich cumulate pile. The sulfide content decreases up-section in the lower zone, and then increases again towards the top of the cumulate sequence. This, combined with the compositional variations with depth, suggests that sulfides in the Huangshanxi Ni–Cu deposit settled downward during at least two sulfide-loaded magma pulses. The fast-growing orthopyroxene-rich cumulate may have acted as a permeability barrier, preventing sulfide percolation into the lower cumulate formed during the first magma pulse. Overall, sector zoning in orthopyroxene and compositional variations in olivine suggest that Si and reduced material addition during contamination is of great importance in forming magmatic Ni–Cu deposits hosted by olivine- and orthopyroxene-dominated intrusions.