Herein, P and Cl doped carbon dots (P/Cl-CDs) were prepared by a simple hydrothermal method. An obvious chemiluminescence (CL) signal was obtained when the P/Cl-CDs coexisted with acidic KMnO4, and then a stronger CL signal appeared when NaHSO3 was added into the mixed solution of KMnO4 and P/Cl-CDs. The CL property and mechanism of P/Cl-CDs in the presence of KMnO4 or/and NaHSO3 have been elucidated. It was found that iodide ion (I−) could strongly inhibit the CL signal of the P/Cl-CDs-KMnO4-NaHSO3 system, and the degree of inhibition was proportional with the concentration of I−. The finding was used to design a method for the determination of I−. Under the optimum conditions, the CL signal of P/Cl-CDs-KMnO4-NaHSO3 system decreased linearly with the logarithm of I− concentration in a range of 0.1–70.0 μM, and the detection limit was 90.0 nM. The method was applied to the determination of I− in edible salt samples. Conceivably, this novel CL system paves the way to numerous new assays based on the use of heteroatoms doping carbon dots.