In this work results of experiments on the in situ production of titanium nitride by the reaction of titania sol-gel with a nitrogenous admixture under laser irradiation are reported. A diode laser beam at different powers and traverse speeds was applied to the mixture placed on EN43 mild steel and 316L stainless steel substrates. Composite coatings of titanium nitride and titanium oxide with a hardness of 17-21 GPa have been achieved by this new method. Surface morphology and microstructure of the deposited coatings and substrate surface layers were examined using optical microscopy, scanning electron microscopy, and field-emission gun scanning electron microscopy. Chemical composition was determined by energy-dispersive X-ray analysis. The phases were identified by X-ray diffraction. Results of microhardness and nanohardness at the top surface were evaluated.