The microstructural evolution of primary Mg2Si in Al–20%Mg2Si with Al–3%P master alloy was observed by scanning electron microscope. And the interfacial properties of AlP/Mg2Si interface were investigated using first-principles calculations. The calculation results show that AlP(1 0 0)/Mg2Si(2 1 1) and AlP(3 3 1)/Mg2Si(1 1 0) interfaces can form steadily. P-terminated AlP(1 0 0)/Mg2Si(2 1 1) interface with the largest work of adhesion (4.13 J/m2) is theoretically the most stable. The interfacial electronic structure reveals that there are covalent Si–Al, Si–P and Mg–P bonds existing between AlP and Mg2Si slabs. Due to the AlP particles as effective heterogeneous nucleus of Mg2Si, primary Mg2Si particles change from dendrite to octahedron/truncated octahedron, and their sizes decrease to ∼20 μm.