Emission spectroscopy diagnostics of carbon plasma created by Nd–Yag laser ablation of a graphite target in nitrogen atmosphere is presented. The influence of the laser energy density in the range of 3–60 J cm−2 on the evolution of the maximum emission intensity and the time of flight of the temporal profile of C2 Swan band and CN violet system is studied at 3 mm from the target surface and at two nitrogen pressures 0.5 and 1 mbar. It has been observed that for fluences ⩽10 J cm−2, the C2 and CN evolutions have the same behaviour and for higher fluences, their evolutions are quite different. For this purpose, a study of the spatio-temporal evolution of the C2 and CN as well as neutral and ionic atomic species of carbon and nitrogen is performed for two values of laser fluences, 8 and 35 J cm−2. The different processes leading to CN formation are proposed and discussed.