In order to address the causes of compositional variations of crust-derived granitic rocks in continental margin arc, we focused on the petrogenesis of Eocene granitic host rocks with enclosed MMEs, associated metagabbro, fine-grained quartz-diorite in Xima-Tongbiguan area, the Tengchong Block, which is a continental margin arc related to the subduction of Neo-Tethys. Both the Eocene granitic and mafic rocks are characterized by gradual increment in enriched compositions, such as K, Rb, Th, LREE, initial 87Sr/86Sr, εNd(t), and εHf(t), but decreasing Pb isotopic ratios from the west to the east of the Tengchong Block.Zircon UPb age data of granitic host rocks, MMEs, metagabbro and fine-grained quartz-diorite reveal a similar age range of 55–50 Ma. The lithologies, zircon Hf compositions, geochemical and isotopic signatures of host granitic rocks show that the origin of these host rocks are mainly controlled by magma mixing between felsic and mafic magma. The products of the mafic magma are dominated by metagabbro, fine-grained quartz-diorite and MMEs enclosed in granitic rocks, which are all resulted from the reaction and mixture between different mafic magmatic products and felsic magma. The metagabbros could be the products of felsic magma mixing with early crystallized mafic magma, and the fine-grained quartz-diorites could be the products of felsic magma mixing with crystal-rich mafic magma, and the MMEs could be the products of felsic magma mixing with crystal-poor mafic magma or melt. The metagabbro has positive εHf(t) values of 1.8 to 10.9, which could provide the relative primitive LuHf isotopic compositions of mafic magma, indicating that the mafic magma is derived from a depleted mantle. The host granitic rocks have negative εNd(t) values of −5.2 to −6.5, indicating that the felsic magma is derived from partial melting of an ancient mafic lower crust. Furthermore, there are excess reactions after magma mixing between the mafic and felsic magma, such as multi-stage reactions between solidified MMEs and felsic magma, and the disaggregation of MMEs, finally resulting in the basification of felsic magma. Magma mixing is therefore the main mechanism of the formation of granitic rocks in the Tengchong Block. The compositional variation of intermediate to acid igneous rock in a continental margin arc is likely dominated by the characteristics of mafic magma because the intermediate to acid igneous rock is derived from mixing of crust-derived granitic and different mantle sources-derived mafic magma.