Cenozoic high–Sr/Y shoshonites in western Yunnan, China, are spatially and temporally associated with porphyry deposits and mafic volcanic rocks that formed at a post–collisional setting. However, the petrogenesis of these rocks and the origins of the associated mineralization remain unclear. Here we present new geochemical data for the high–Sr/Y shoshonites and associated mafic microgranular enclaves (MMEs) in the Jinshajiang–Ailaoshan mineralization belt, which formed as a result of India–Asia collision during the Cenozoic. Both fertile and barren shoshonitic porphyries were emplaced during the Eocene–Oligocene (32–37 Ma) and are characterized by enrichment in large–ion lithophile elements (LILE), depletion in high field strength elements (HFSE), high K2O (4–6 wt%), Sr contents (674–1370 ppm), and low Y contents (7–18 ppm). The barren Zhanhe, Yongsheng, Songgui, and Jianchuan, and fertile Machangqing (Cu–Au–Mo mineralization) porphyry intrusions have variable zircon εHf(t) values of −6 to +9 and old TDM2 ages of 1433 to 900 Ma. However, the barren Shigu porphyry intrusion yields relatively positive zircon εHf(t) values (−4 to +8) and younger TDM2 ages (903–631 Ma). These features indicate that the Shigu intrusion was derived from late Permian juvenile lower crust, and the other high Sr/Y shoshonites were derived mainly from Neoproterozoic juvenile lower crust. Fertile and barren porphyries have variable whole–rock εNd(t) values (−5 to −0.7) and (87Sr/86Sr) i ratios (0.70595–0.70788) that are within the range of coeval mafic magmas in western Yunnan. The MMEs comprise mafic enclaves and andesitic enclaves that formed during the Eocene (34–35 Ma) and have spheroidal shapes, igneous textures and contain acicular apatites. This indicates that the MMEs are globules of coeval mafic magma that was injected into and mixed with the host shoshonitic magma. The enclaves show low TiO2 contents (0.7–0.8 wt%), high MgO (6–9 wt%), Cr (184–450 ppm) and Ni contents (98–157 ppm), positive LILE anomalies, marked negative HFSE anomalies, a narrow range of εNd(t) values (−1.2 to −0.6), and (87Sr/86Sr) i values of 0.70556–0.70635. The andesitic enclaves show adakitic geochemical affinities and have similar zircon εHf(t) values (−2.7 to +2.5) to the host porphyries, whereas, the mafic enclaves have relatively negative zircon εHf(t) values (−8.7 to +1.5), similar to enriched mantle. These evidences suggest the high−Sr/Y shoshonites were produced by partial melting of juvenile lower crust mixed with ultrapotassic or potassic mafic magmas as represented by the andesitic enclaves. The mafic enclave melts were derived from enriched mantle metasomatized by slab–derived fluids, which elevated the Mg#, Cr, Ni contents of the host porphyries at Machangqing, Zhanhe and Yongsheng.Zircon saturation temperatures (TZr) of the high–Sr/Y shoshonitic rocks range from 735 to 777 °C and indicate the shoshonites were derived mainly from water–fluxed melting of lower crust. The Manchangqing fertile intrusion had a high oxidation state (zircon Ce4+/Ce3+ = 38–180, average = 91) and was derived by mixing between juvenile lower–crustal melts and voluminous coeval lamprophyres. In contrast, the barren Jianchuan, Songgui, Shigu, Yongsheng and Zhanhe high–Sr/Y shoshonites formed by partial melting of juvenile lower crust and some mixing with mafic lavas, and are characterized by low oxygen fugacity (zircon Ce4+/Ce3+ = 0.5–77, average = 20). As such, we suggest the mafic magmas triggered water–fluxed, moderate–degree partial melting of the lower crust and caused amphibole breakdown during melting. This process could not provide enough water for the formation of porphyry Cu-Au deposits in western Yunnan, and therefore formed low–fO2, relatively low–H2O, and barren high–Sr/Y magmas. However, ultrapotassic magmas (e.g., lamprophyres) with high H2O are able to trigger intense water–fluxed, partial melting of metal–fertilized lower crust, which generated high–fO2, relatively high–H2O, fertile, high–Sr/Y shoshonitic magmas in this intracontinental setting.