Understanding magnetism in ferromagnetic metal/semiconductor (FM/SC) heterostructures is important to the development of the new-generation spin field-effect transistor. Here, we report an element-specific X-ray magnetic circular dichroism study of the interfacial magnetic moments for two FM/SC model systems, namely, Co/GaAs and Ni/GaAs, which was enabled using a specially designed FM1/FM2/SC superstructure. We observed a robust room temperature magnetization of the interfacial Co, while that of the interfacial Ni was strongly diminished down to 5 K because of hybridization of the Ni d(eg) and GaAs sp3 states. The validity of the selected method was confirmed by first-principles calculations, showing only small deviations (<0.02 and <0.07 μB/atom for Co/GaAs and Ni/GaAs, respectively) compared to the real FM/SC interfaces. Our work proved that the electronic structure and magnetic ground state of the interfacial FM2 is not altered when the topmost FM2 is replaced by FM1 and that this model is applicable generally for probing the buried magnetic interfaces in the advanced spintronic materials.