Although a number of petrographic observations and isotopic data suggest that magma mixing is common in the genesis of granitoids, it is still controversial whether mantle-derived magmas are involved in their formation. Zircon Hf and O isotopes can place robust constraints on the origin of granitoids, particularly deciphering the contributions of mantle- versus crust-derived magmas. In this study, we carried out a systematic examination of in-situ zircon Hf–O isotopes, as well as whole-rock major and trace elements, for mineralized Middle–Late Triassic syenogranite and diorite in the Hutouya deposit, NW China. Our results show that the parental magmas for syenegranite and diorite both underwent significant crystal fractionation, and belong to I-type and A-type granitic magmas, respectively. The Hutouya syenogranite and diorite are very homogeneous in terms of zircon Hf–O isotopes, with εHf(t) values and δ18O ranging from − 3.15 to 1.55 and 5.97 ‰ to 7.77 ‰, respectively. These lines of evidence collectively emphasize that both mantle- and crust-derived magmas contribute to the formation of mineralized granitoids from the Hutouya deposit, although the latter seemingly plays a predominant role compared to the former. Combined with published studies, we suggest that magma mixing may be the key to forming fertile magmas related to the Cu polymetallic mineralization in the Hutouya deposit.