The excitation-dependent feature of nitrogen and sulfur doped carbon dots was discussed from 270 nm to 500 nm. With increasing of the excitation from 270 nm to 300 nm, the maximum luminescence peak will have a blue-shift, however, keeping the increase of the excitation, there are red-shift of maximum peak.