Chlorpromazine hydrochloride (CPZ) is a phenothiazine antipsychotic drug, which can effectively relieve the symptoms of chronic or severe mental disorders and reduce the manic phase of manic depression. However, excessive CPZ (more than 2 g per day) can cause serious harm to the health of the body, such as cholestatic jaundice, leukopenia, orthostatic hypotension, extrapyramidal effects and contact dermatitis. Therefore, a simple, fast, and accurate method to detect and identify CPZ is very important, especially for the detection of biological samples. In this study, based on the principle of inorganic salt inducing nanoparticle agglomeration, we synthesized silver colloids (AgNPs) with plasmon resonance effect. And we introduced inorganic salt MgBr2 to induce self-limiting aggregation of AgNPs, resulting in a large number of “hot spots” in the nanoparticle gap. Thereby significantly enhancing the SERS intensity. The surface-enhanced Raman spectroscopy (SERS) method proposed in this paper can achieve real-time rapid detection of chlorpromazine hydrochloride in the field, with a linear range of 0.1–100 ppm (R2 = 0.992). The calculated detection limit was 0.048 ppm. This strategy enables high stability and good repeatability of the SERS spectra. The application of established method can achieve the rapid and accurate determination of CPZ in pig urine. The recovery of standard addition was 87.50–107.70% and the RSD was between 2.87% and 7.42%. Therefore, the SERS detection technology in this study provides a new insight for the rapid, effective and accurate determination and identification of CPZ in pig urine.