Time-resolved optical emission spectroscopy was employed to examine the temporal properties of a plume formed by laser ablation of a graphite target in He, N2, and Ar background gases. Time-dependent spectroscopic temperatures of electronically excited C2 and CN molecules generated in the plume at different background gases and pressures were derived by simulation of the emission spectra. The rotational temperature of CN molecules was significantly higher than the vibrational temperature. This indicates that they are formed in the gas phase by the chemical reaction C2+N2→CN. At pressure above 0.5 Torr, the temperature in each background gas was apparently in the order of Ar≫N2≫He while there was no such gas dependence at 0.1 Torr. The expansion dynamics and cooling rate of the plume turned out to be highly dependent on the background gas and its pressure.