To improve the efficiency of nitrogen removal from pharmaceutical wastewater, wastewater from traditional Chinese medicine was treated in an anaerobic sequencing batch reactor (ASBR) combined with a modified sequencing batch biofilm reactor (SBBR). The chemical oxygen demand (COD) and total nitrogen (TN) contents were 3,750 ± 50 mg/L and 210 ± 10 mg/L, respectively. After 99 days of start-up and domestication, the COD, NH4+-N, and TN contents in the effluent were 230 ± 10 mg/L, 1 ± 0.5 mg/L, and 5 ± 3 mg/L, respectively, and the removal efficiencies reached more than 93.5, 99, and 96%, respectively. Among these results, the COD removal efficiency in traditional Chinese medicine wastewater with an ASBR reached more than 85%, and the effluent and raw water were mixed to adjust the C/N ratio in the SBBR influent. The initial operation mode of the improved SBBR was anaerobic–aerobic–anoxic. When the C/N ratio in the influent was adjusted to 5, the simultaneous nitrification and denitrification (SND) in the aerobic section was gradually enhanced, and the endogenous denitrification (ED) in the anoxic section gradually decreased. In conclusion, deep denitrification of the system was achieved only through SND, and the running time of the cycle was shortened from the initial 24 to 4.6 h. High-throughput sequencing analysis showed that the relative abundances of Bacteroidetes and Proteobacteria in the system were 39.69 and 37.34%, respectively. The content of Firmicutes with denitrification in the system was also high, accounting for 5.17%. At the genus level, the bacteria with denitrification functions in the system were mainly Thauera and unidentified_Sphingobacteriales, accounting for 5.67 and 1.66% of the system, respectively. In addition, there was heterotrophic nitrification–aerobic denitrification (HN-AD) activated in the system, including Denitratisoma, Paracoccus, and Pseudomonas. The total relative abundance of these bacteria was 0.612%. Their existence may be one of the reasons for the good effect of SND in this system.