A sensitive and facile method for the detection of carbamazepine (CBZ) was established based on the inner filter effect (IFE). In this IFE system, blue-emitting carbon dots (CDs) were used as a fluorophore and CBZ was a capable absorber, competitively absorbing the excitation light of the CDs. As a result, the fluorescence of the CDs could be quenched effectively by CBZ due to the inner filter effect. The interaction between the CDs and CBZ was studied, and we found that the absorption spectrum of CBZ overlapped with the excitation spectrum of the CDs. The excitation of the CDs was significantly weakened due to competitive absorption, resulting in the fluorescence quenching of the CDs. Under the optimum conditions, the fluorescence quenching efficiency versus the concentration of CBZ from 10-90 g mL(-1) gave a linear response, and the limit of detection (3 sigma/K) was 1.93 g mL(-1). The method was successfully applied to the detection of CBZ in tablet and human urine samples. The present method is simple, economical, and friendly to the environment, showing potential utility in practice.