This study concerns the production of advanced materials and a novel technique for enhancing photocatalytic efficiency, focusing specifically on the purification of air contaminated with methane gas. Titanium dioxide:Titanium nitride (TiO2/TiN) nanocomposite films were prepared by dc reactive magnetron sputtering of highly-pure titanium sheet in presence of oxygen and nitrogen as reactive gases with optimized mixing ratios to produce the composite structures. The structural, morphological, and optical characteristics of the prepared nanocomposites were determined and analyzed. The primary goal of this study was to enhance the photocatalytic activity of such nanocomposites against methane gas pollution. It is observed that increasing the nitrogen content in the TiO2:TiN nanocomposite structure led to notable improvements in photocatalytic efficiency. Specifically, when these nanocomposites were subjected to a UV light, they exhibited enhanced photocatalytic activity in the removal of methane gas from the surrounding air, which demonstrates a direct correlation with increased nitrogen (N) content in the composite structure. These nanocomposites are reasonably promising in removing harmful gases and pollutants present in indoor and outdoor environments. This exploration not only sheds light on the remarkable potential of TiO2:TiN nanocomposites for air purification but also highlights the importance of innovative techniques, such as dc reactive magnetron sputtering in the field of materials science and engineering as well as in environmental remediation.