Diamond-like carbon (DLC) has attracted much attention due to its unique properties such as high chemical inertness, optical transparency, and high biocompatibility. In this study, the total gas flow rate was kept constant, while the ratio of reactive gases was varied to deposit nitrogen-doped diamond-like carbon thin films on glass substrates using radiofrequency plasma-enhanced chemical vapor deposition. The effects of the gas flow ratio on the composition, microstructure, surface morphology, and optical properties of the thin films were investigated through extended deposition times. It was found that with an increase in the nitrogen-to-methane gas flow ratio, the film surface became smoother and more compact. The maximum transmittance in the visible range reached 90%, and the highest and lowest transmittance in the same ultraviolet wavelength region differed by up to 25.62% among several sample groups. The optical bandgap decreased from 3.58 eV to 3.46 eV, contrary to the trend of the sp2 fraction variation. Compared with other studies, this study considered the preparation of nitrogen-doped diamondoids using a chemical vapor deposition method with a lesser total gas flow rate passed into it, which provides practical data reference value for the preparation of N-DLC.