Microbial fuel cell (MFC) processes are associated with poor effluent quality when treating antibiotic wastewater. This study innovatively applied osmotic microbial fuel cell (OsMFC) technology to treat antibiotic wastewater while achieving the efficient removal of sulfamethoxazole (SMX), producing high-quality water, and generating electricity. During the stable operation of the OsMFC system, the chemical oxygen demand (COD) removal efficiency reached 80.1%, and the SMX removal efficiency reached 99.3% owing to forward osmotic membrane interception and biodegradation. The high-quality water production rate was 25% ± 5%. Interestingly, the addition of SMX improved the electrochemical performance of the system. The maximum power density was 4,642.4 mW/m3, and the internal resistance was only 230.7 Ω. During long-term operation of the system, membrane fouling was slight, and proteins were the main component of the fouling, followed by α-D glucopyranose polysaccharides and β-D glucopyranose polysaccharides. This study provides a new approach for the treatment of antibiotic wastewater and a novel method for the biodegradation of challenging emerging pollutants.