Superconductors are used in military and commercial applications due to the full diamagnetic and zero resistance properties. Hereinto, niobium nitride (NbN) has been extensively studied for its excellent superconducting properties, such as high transition temperature ( T c), large superconducting energy gap, narrow transition width and good stability. Superconducting NbN films are widely used in low temperature superconducting devices, for instance, hot electron bolometer, superconducting quantum interference devices and rapid single flux quantum. Especially, in 2001 Gol’tsman has successfully detected a single photon response of 810 nm near-infrared using an ultra-thin superconducting NbN, which proved that the high-quality growth of ultra-thin NbN film was the key step for high resolution and sensitivity of the superconducting detector. Up to now, atomic layer deposition (ALD), molecular beam epitaxy (MBE), pulsed laser deposition (PLD) and magnetron sputtering have been successfully used to grow NbN thin films. However, T c is decreasing gradually as the reduced of thickness. Therefore, there is still a challenge to grow ultra-thin superconducting NbN film with high performance. In this work, 5 nm thickness of superconducting epitaxial NbN film has been grown on MgO substrate by magnetron sputtering. We systematically study the effect of different sputtering parameters on the superconductivity properties of the NbN film. The experiment results show that the high vacuum, high sputtering temperature and low working pressure are positively correlated with the superconducting transition temperature of NbN film under the premise of suitable argon-nitrogen ratio or magnetron power. The analyses of physical property measurement system (PPMS) indicate that as-grown 5 nm-thick NbN film has high performance with a superconducting transition temperature as high as 12.5 K under the optimum condition. Morphologic characterizations show that the ultra-thin NbN films have high density and smoothness with 0.116 nm of the surface roughness. Microstructural measurements also illustrate the epitaxial growth of NbN on MgO substrate. This work demonstrates the ultra-thin NbN films can be well controllably grown with high quality and offers a platform to fabricate the ultra-thin superconducting devices in the coming future.