Boron‐doped titanium nitride (TiBN) thin films with nanosized grains were prepared by a magnetron sputtering method. X‐ray diffraction and transmission electron microscopy observation indicated that TiBN thin films have a cubic structure with grains ∼5 nm in size. The photoluminescence (PL) of the films was investigated as a function of temperature over a wavelength range of 350–900 nm. Two PL peaks near 3.20 and 2.38 eV were conisdered to have resulted from the recombination of the donor‐bound excitons and deep‐trap defects with the holes in the valence band, respectively. An energy transfer from bound electrons to deep‐trap defects was observed in the nanocomposite thin film.