Abstract Here we report a new strategy for preparation of water-soluble photoluminescent carbon quantum dots (CQDs) from petroleum coke. Petroleum coke was oxidized first in mixed concentrated H2SO4 and HNO3, and then functionalized by hydrothermal ammonia treatment. The as-made CQDs and nitrogen-doped CQDs (N-CQDs) were characterized by UV–Vis absorption spectroscope, fluorescence spectroscope, transmission electron microscope, atomic force microscope, Raman spectrometer, X-ray powder diffractometer, X-ray photoelectron spectroscope and Fourier transform infrared spectrometer. The results show that the quantum yield of CQDs increases greatly from 8.7 to 15.8%, and the fluorescent lifetime increases from 3.86 to 6.11ns after the hydrothermal treatment in ammonia. Moreover, the fluorescent color of N-CQDs can be tuned through the amount of doped nitrogen. Both CQDs and N-CQDs are water-soluble, and have uniform particle distribution, strong luminescence, and highly fluorescent sensitivity to pH in a range of 2.0–12.0. The uniform size distribution and nitrogen-doping of N-CQDs help to lead to high yield of radiative recombination, resulting in improved fluorescence properties. This work offers a simple pathway to produce high quality and enhanced photoluminescent CQDs from petroleum coke.