In alkaline earth stannates, MgSnO3 has low density, high specific strength and wide bandgap (∼ 4.0 eV), which is a particularly promising semiconductor material. However, the lack of single crystal film limits the application of such materials in photoelectric devices. Here, high-quality MgSnO3 epitaxial film was grown on SrTiO3 substrate by pulsed laser deposition (PLD). The film grown under an oxygen pressure of 5 Pa at 900 °C presented the best crystal quality, which has high transmittance (> 93%) and wide bandgap (3.94 eV). The in-plane and out-of-plane epitaxial relationships between the film and substrate are MgSnO3[1 00] ⎜⎜SrTiO3[1 0] and MgSnO3(0001) ⎜⎜SrTiO3(111), respectively. Due to the lower formation energy of Mg vacancies compared to Sn vacancies, the Mg/Sn molar ratio in the film is less than 1, increasing with the oxygen pressure rising during the film. For the solar-blind photodetector based on 10 Pa sample, the device presents a photo-responsivity of 3.76 10-3 A W-1 and a fast speed of photoresponse (< 0.05 s). The excellent performance exhibited by single crystal thin films will undoubtedly promote the development of MgSnO3 based single crystal devices.