The accumulation of volatile fatty acids (VFAs) caused by antibiotic inhibition significantly reduces the treatment efficiency of sulfamethoxazole (SMX) wastewater. Few studies have been conducted to study the VFAs gradient metabolism of extracellular respiratory bacteria (ERB) and hydrogenotrophic methanogen (HM) under high-concentration sulfonamide antibiotics (SAs). And the effects of iron-modified biochar on antibiotics are unknown. Here, the iron-modified biochar was added to an anaerobic baffled reactor (ABR) to intensify the anaerobic digestion of SMX pharmaceutical wastewater. The results demonstrated that ERB and HM were developed after adding iron-modified biochar, promoting the degradation of butyric, propionic and acetic acids. The content of VFAs reduced from 1166.0 mg L−1 to 291.5 mg L−1. Therefore, chemical oxygen demand (COD) and SMX removal efficiency were improved by 22.76% and 36.51%, and methane production was enhanced by 6.19 times. Furthermore, the antibiotic resistance genes (ARGs) such as sul1, sul2, intl1 in effluent were decreased by 39.31%, 43.33%, 44.11%. AUTHM297 (18.07%), Methanobacterium (16.05%), Geobacter (6.05%) were enriched after enhancement. The net energy after enhancement was 0.7122 kWh m−3. These results confirmed that ERB and HM were enriched via iron-modified biochar to achieve high efficiency of SMX wastewater treatment.