Metal oxynitrides are compounds between nitrides and oxides with a certain level of photocatalytic functions. The purpose of this study is to investigate an appropriate range of oxygen flow rate during sputtering for depositing tantalum oxynitride films. The sputtering process was carried out under fixed nitrogen but variable oxygen flow rates. Post rapid thermal annealing was conducted at 800 °C for 5 min to transform the as-deposited amorphous films into crystalline phases. The material characterizations of annealed films include X-ray diffraction and Raman spectroscopy for identifying crystal structures; scanning electron microscope for examining surface morphology; energy-dispersive X-ray spectroscopy to determine surface elemental compositions; four-point probe and Hall effect analysis to evaluate electrical resistivity; UV-visible-NIR spectroscopy for quantifying optical properties and optical bandgaps. To assess the photocatalytic function of oxynitride films, the degradation of methyl orange in de-ionized water was examined under continuous irradiation by a simulated solar light source for six hours. Results indicate that crystalline tantalum oxynitride films can be obtained if the O2 flow rate is chosen to be 0.25-1.5 sccm along with 10 sccm of N2 and 20 sccm of Ar. In particular, films deposited between 0.25 and 1.5 sccm O2 flow have higher efficiency in photodegradation on methyl orange due to a more comprehensive formation of oxynitrides.