The electrochemiluminescence (ECL) system based on the ruthenium complex has become a powerful tool in the field of analytical chemistry. However, the non-aqueous ECL luminescence system, which does not involve complex nano-modification, has not been widely used for the determination of analytes. In this study, N-methyl pyrrolidone was selected as the solvent, and it could also act as a co-reactant of [inline-formula removed]. Based on this, a simple ECL system without nanomaterials was established. Strong ECL was generated. Furthermore, a quenching effect between the excited state of [inline-formula removed] and sulphamethoxazole (SMZ) was observed. Based on this, a sensitive ECL sensor for detecting SMZ is constructed. A linear relationship between ECL signal quenching intensity (ΔI) and the logarithm of SMZ concentration (log C) in the concentration range of 1 × 10-7-1 × 10-5 mol/l is obtained. The limit of detection is as low as 3.33 × 10-9 mol/l. The method has been applied to the detection of SMZ in tap water samples with different concentration levels with satisfactory results, and the recovery was 95.3-102.6%.