In this paper we present a comparative study of the properties of amorphous hydrogenated silicon carbonitride (SiCN:H) thin films deposited by electron cyclotron resonance plasma enhanced chemical vapor deposition (ECR-PECVD). The elemental composition, growth rate, density, and refractive index values of the SiCN:H thin films were analyzed as functions of flow rates of pure acetylene (C2H2) and methane (CH4) hydrocarbon precursors. The mechanical properties were studied with nanoindentation measurements to compare hardness and Young’s modulus of the SiCN:H thin films deposited with different carbon sources. Variable angle spectroscopic ellipsometry (VASE), elastic recoil detection (ERD), and Rutherford backscattering spectrometry (RBS) were used to determine thin film properties. Higher carbon content in the thin films was achieved by acetylene compared to methane at the same flow rate due to its lower ionization energy during the deposition. Infrared (IR) absorption spectra of the thin films deposited with acetylene precursor were analyzed to determine the correlation between the hydrocarbon flow rate and the intra-molecular bond intensities in the thin films. We found that the major contribution to the hardness comes from hydrogen (H) in the SiCN matrix which makes the films less dense. Carbon improves the hardness, however, H introduced by the hydrocarbon reduces the mechanical strength.