A method was developed for the determination of 33 antibiotics belonging to 4 different antibiotic groups, including sulfonamides (16), fluoroquinolones (12), macrolides (1), and tetracyclines (4) in water samples using on-line solid-phase extraction-ultra performance liquid chromatography-electrospray ionization tandem mass spectrometry (on-line SPE-UPLC-MS/MS). The enrichment and analysis conditions were optimized for the determination of trace concentrations (nanogram per liter). Aliquots of the water samples (5 mL) were filtered through a membrane and enriched on an on-line polymeric column with hydrophilic–lipophilic balance (HLB). The analyte was eluted by the mobile phase during on-line SPE and separated on an Acquity BEH130 column, detected by tandem mass spectrometry, and quantified using an external standard method. The optimization of the analytical methods was discussed, which included optimization of pH of the sample, filtration membrane, Na2EDTA, chromatographic column, formic acid and aqueous ammonia in mobile phase. The detection limit for all test compounds by this method was in the range of 0.2–1.5 ng/L, with recoveries of 76.6–118%. The precision of the method, as indicated by the relative standard deviation, was 2.4–7.9%. Results of analysis of surface water samples demonstrated the ability of the proposed method to analyze ultra-trace levels of antibiotics, without the need for complex manual pretreatment.