The Qingshanbao complex, part of the uranium metallogenic belt of the Longshou-Qilian mountains, is located in the center of the Longshou Mountain next to the Jiling complex that hosts a number of U deposits. However, little research has been conducted in this area. In order to investigate the origin and formation of mafic enclaves observed in the Qingshanbao body and the implications for magmatic-tectonic dynamics, we systematically studied the mineralogy, petrography, and geochemistry of these enclaves. Our results showed that the enclaves contain plagioclase enwrapped by early dark minerals. These enclaves also showed round quartz crystals and acicular apatite in association with the plagioclase. Electron probe analyses showed that the plagioclase in the host rocks (such as K-feldspar granite, adamellite, granodiorite, etc.) show normal zoning, while the plagioclase in the mafic enclaves has a discontinuous rim composition and shows instances of reverse zoning. Major elemental geochemistry revealed that the mafic enclaves belong to the calc-alkaline rocks that are rich in titanium, iron, aluminum, and depleted in silica, while the host rocks are calc-alkaline to alkaline rocks with enrichment in silica. On Harker diagrams, SiO2 contents are negatively correlated with all major oxides but K2O. Both the mafic enclaves and host rock are rich in large ion lithophile elements such as Rb and K, as well as elements such as La, Nd, and Sm, and relatively poor in high field strength elements such as Nb, Ta, P, Ti, and U. Element ratios of Nb/La, Rb/Sr, and Nb/Ta indicate that the mafic enclaves were formed by the mixing of mafic and felsic magma. In terms of rare earth elements, both the mafic enclaves and the host rock show right-inclined trends with similar weak to medium degrees of negative Eu anomaly and with no obvious Ce anomaly. Zircon LA-ICP-MS (Laser ablation inductively coupled plasma mass spectrometry) U-Pb concordant ages of the mafic enclaves and host rock were determined to be 431.8 5.2 Ma (MSWD (mean standard weighted deviation)= 1.5, n = 14) and 432.8 4.2 Ma (MSWD = 1.7, n = 16), respectively, consistent with that for the zircon U-Pb ages of the granite and medium-coarse grained K-feldspar granites of the Qingshanbao complex. The estimated ages coincide with the timing of the late Caledonian collision of the Alashan Block. This comprehensive analysis allowed us to conclude that the mafic enclaves in the Qingshanbao complex were formed by the mixing of crust-mantle magma with mantle-derived magma due to underplating, which caused partial melting of the ancient basement crust during the collisional orogenesis between the Alashan Block and Qilian rock mass in the early Silurian Period.