The misuse of chloramphenicol (CAP) has led to the development of drug-resistant strains that pose significant threats to public health. Here, we propose a universal flexible surface-enhanced Raman spectroscopy (SERS) sensor utilizing gold nanotriangles (AuNTs) and polydimethylsiloxane (PDMS) film for rapid detection of CAP in food samples. Initially, AuNTs@PDMS with unique optical and plasmonic properties were used to collect spectra of CAP. Afterward, four chemometric algorithms were executed and compared. Accordingly, random frog-partial least squares (RF-PLS) exhibited optimum results with correlation coefficient of prediction (Rp = 0.9802) and the lowest root-mean-square error of prediction (RMSEP = 0.348 µg/mL). Furthermore, the sensor's efficacy to detect CAP in milk samples was confirmed, and the findings were compatible with the conventional HPLC approach (P > 0.05). Therefore, the proposed flexible SERS sensor could effectively be used to monitor milk quality and safety.