The Mg2Si/4H‐SiC heterojunction was prepared by radio frequency (RF) magnetron sputtering technique. The binding energies of Mg 2p, Si 2p, and C 1s core levels and the maxima of valence band were measured by X‐ray photoelectron spectroscopy (XPS). Using the optical bandgap of Mg2Si (0.78 eV) and 4H‐SiC (3.25 eV), the band offsets of valence band (VBO) and conduction band (CBO) at Mg2Si/4H‐SiC interface were identified as 1.47 and 1.00 eV, respectively. The band alignment was evaluated to be type‐I band alignment. The Mg2Si/4H‐SiC heterojunction could be a promising candidate for the infrared (IR) photodetector.