Hydrogen free amorphous carbon (a-C) and carbon nitride (a-C:N) were synthesized by means of shielded arc ion plating in which a shielding plate was inserted between a target and a substrate in order to reduce macroparticle deposition onto the substrate. Using a graphite target as a cathode, thin films of a-C and a-C:N were prepared in an arc discharge plasma of argon or nitrogen gas, respectively, at a pressure of 1 Pa. Based on nanoindentation, mechanical properties of these films were studied in relation to substrate bias voltage (VS). The a-C films prepared at VS ranging from −50 to −200 V consisted of diamond-like phase and showed hardness higher than 20 GPa with its maximum of 35 GPa at Vs = −100 V. However, hardness of the films deposited at VS < -300 V was less than 7 GPa indicating that the films were converted to graphite-like phase due to excessive ion impact in Ar plasma. Wear resistance of the a-C films was closely related to their hardness. Namely, a harder a-C film was more wear resistant. On the contrary, hardness of the a-C:N films was less dependent on VS. It remained in the range of 10 to 15 GPa and was much lower than the maximum hardness of the a-C films. Nevertheless, the wear resistance of the a-C:N films was comparable to or much better than the a-C films. In particular, the a-C:N film prepared at VS = -300 V was so wear resistant that the film showed no apparent wear when rubbed with a diamond tip less than 100 nm in tip-diameter at a contact force of 20 μN. The presence of β-C3N4 like phase characterized by a Nls XPS peak at 400.5 eV has found to be crucial for high wear resistance of the a-C:N films.