Hexagonal boron nitride (hBN) is promising for applications in neutron detection and quantum sensing. Here we created spin-dependent luminescence defects in hBN using 50 keV helium ion beam. The irradiated hBN flakes with a dose around 2 × 1014–1 × 1015/cm2 have the maximum photoluminescence (PL) intensity. The PL spectra are in the range of 700–1000 nm with a peak around 818 nm at 297 K after irradiation with a dose of less than 2 × 1014/cm2, which can be eliminated by high temperature annealing at 1097 K due to defects repair according to Raman spectra. However, the PL peaks exhibit a redshift from 818 nm to 830 nm when the irradiation dose is no less than 1 × 1015/cm2. Combining with constrained density functional theory calculations, it is found that high dose irradiation can cause local lattice swelling and further induce the redshift of PL spectra by 12 nm/0.33% strain. Furthermore, we proposal a novel optical neutron detection method by recording the intensity and position of PL signal of luminescence defects induced by neutron-10B nuclear reaction daughter particles. This work would be helpful to create luminescence defects in hBN for quantum sensing, and develop a novel neutron detector.