Thermal neutron detectors based on hexagonal boron nitride (h-BN) epilayers have demonstrated a record high efficiency among solid-state detectors at 58%. It was found that the performance of h-BN detectors is profoundly influenced by charge recombination at the surfaces. The dynamic process of surface oxidation in h-BN epilayers has been probed by x-ray photoelectron spectroscopy. The spectra of high-resolution (0.1 eV) scans indicated that the linewidth of the B 1s peak at 190.6 eV increased and the peak intensity decreased with an increase in exposure time in-air (tair). The main B 1s peak at 190.6 eV evolved into multiple peaks at a higher binding energy position due to oxygen impurities tending to occupy nitrogen sites and form the B-O bond. Time constants of the oxidation process have been determined, revealing that the formation process of the B-O bond is very fast and within minutes in h-BN. The results suggest that reducing nitrogen vacancy generation during growth and employing surface treatment techniques would further improve the performance of h-BN devices.