The Paleo-Tethys tectonic zone has been recognized as a world-class rare-metal (Li-Rb-Be-Nb-Ta) pegmatite belt. Previous studies indicate that the rare-metal pegmatite mineralization is related to the Late Triassic-Early Jurassic granitoids. However, it remains debated which granites, among the various coeval I-, A- and S-type granitoids in the tectonic belt, are responsible for the rare-metal pegmatite mineralization. We address these questions through a systematic geochemical study of the Bailongshan granite complex, which is composed of both biotite granites and two-mica granites and is related to the largest Li deposit in this zone. The similarities in Sr-Nd-Hf-O isotopic compositions between the two-mica granites (ISr=0.7176 to 0.7183, epsilon Nd(t)= - 10.7 to - 10.1, epsilon Hf(t)= - 14.12 to - 4.58, delta 18O = 10.11 to 13.46 parts per thousand) and rare-metal pegmatites (ISr=0.7181 to 0.7189, epsilon Nd(t)= - 11.72 to - 10.68, epsilon Hf(t)= - 12.15 to - 5.37, delta 18O = 10.37 to 12.37 parts per thousand), both showing affinity with sedimentary source, provide convincing evidence that the rare-metal pegmatites were derived from the two-mica granites. The differences in these parameters between the two-mica granites and the biotite granites (ISr=0.7083 to 0.7086, epsilon Nd(t)= - 5.9 to - 5.7, epsilon Hf(t)= - 6.64 to - 1.50, delta 18O = 7.27 to 9.36 parts per thousand, characteristic of I-type granites) indicate that they were derived from different sources. Trace element modeling indicates that the pegmatites were produced via extremely high fractional crystallization (> 90%) of the two-mica granites, which is also supported by the difference in delta 7Li values between the two-mica granites (-0.6 to 0.5 parts per thousand) and pegmatites (2.04 to 4.94 parts per thousand). Comparison of the geochemical data between the two-mica granites and metasedimentary rocks in the area suggests that the rare metals in the mineralizing magmas were most likely derived from the partial melting of metapelites of the Triassic Bayanharshan Group. The relatively high temperatures (771 to 830 degrees C) estimated from the Ti-in-zircon thermometer for the two-mica granites favor extraction of rare metals from both biotite and muscovite in the source rocks during the partial melting. The results of this study, together with published data of Late Triassic to Early Jurassic granitoids in the Paleo-Tethys tectonic zone, indicate that the rare-metal pegmatite mineralization is related to S-type granites, but not all S-type granites are fertile. The combination of rare-metal-rich source rocks (metapelites), high temperatures due to an external heat source favoring the release of rare metals from the source rocks, and high degrees of fractional crystallization facilitating further enrichment of rare-metals in the pegmatite magmas, is critical for the rare-metal mineralization.