Carbon nitride films prepared by ion beam assisted deposition were studied by Raman and infrared spectroscopy, as a function of nitrogen ion energy (200, 400, and 600 eV) and the ion to atom arrival rate ratio R(I/A) ranging from 0.9 to 2.5. The composition ratio N/C in the film determined by elastic recoil detection analysis was found to be proportional to R(I/A); however, the film growth is possible only if R(I/A) is smaller than a critical value of chemical sputtering yield. This value was found to be 0.21. The maximum value of N/C obtained was 0.9 (47 at.% of nitrogen) for the film deposited with ion energy of 400 eV. In order to understand the effect of nitrogen incorporation on the structure of the films, the parameters were determined from the Raman spectra analysis of the films and found to show strong dependences of the nitrogen content in the films; the behaviors of the G peak position and width, and I D/IG ratio are correlated with the structure changes in the films.