An integrated method combining solid-phase extraction (SPE) with ultra-performance liquid tandem mass spectrometry (UPLC-MS/MS) has been established for quantifying bacitracin (BTC), bacitracin zinc (BZ), and bacitracin methylene disalicylate (BMD) in animal feed. A pretreatment procedure that can effectively, quickly, and simultaneously extract and purify BTC, BZ, or BMD in feed was developed for the first time through the optimization of extraction and SPE conditions. After extraction with acetonitrile + methanol + 15 % ammonia solution (1:1:1, v:v:v) and dilution with EDTA solution (1.5 mmol/L, pH 7.0), a SPE procedure was carried out with C-18 cartridge. Following LC-MS/MS analysis utilized a Waters Peptide BEH C-18 column with a gradient elution of 0.1 % formic acid in water/acetonitrile with. This method demonstrated a strong linear correlation (R-2 > 0.9980) across a 0.01-1.0 mg/L concentration span, based on a matrix-matched standard curve. Satisfactory recoveries of BTC (bacitracin A, B-1, B-2, and B-3), BZ, and BMD in different feeds were obtained from 80.7 % to 108.4 %, with relative standard deviations below 15.7 %. Low limits of quantification ranging within 7.2-20 mu g/kg were achieved for bacitracin A, B-1, B-2, and B-3. This method provided an effective and reliable detection method to prevent the addition of BTC and different BTC formulations in feeds.