Microplastics (MPs) and nanoplastics (NPs) are prevalent in sewage and pose a potential threat to nitrogen biotransformation in wastewater treatment systems. However, investigations on how MPs and NPs affect the microbial nitrogen conversion and metabolism of the activated sludge are still scanty. Herein, the responses of microbiomes and functional genes to polystyrene MPs and NPs in activated sludge systems were investigated by metagenomic analysis. Results indicated that 1mg/L MPs and NPs had marginal impacts on the nitrogen removal performance of the activated sludge systems, whereas high concentrations of MPs and NPs (20 and 100mg/L) decreased the total nitrogen removal efficiency (13.4%-30.6%) by suppressing the nitrogen transformation processes. Excessive reactive oxygen species induced by MPs and NPs caused cytotoxicity, as evidenced by impaired cytomembranes and decreased bioactivity. Metagenomic analysis revealed that MPs and NPs diminished the abundance of denitrifiers (e.g. Mesorhizobium, Rhodobacter and Thauera), and concurrently reduced the abundance of functional genes (e.g. napA, napB and nirS) encoding for key enzymes involved in the nitrogen transformations, as well as the genes (e.g. mdh) related to the electron donor production, thereby declining the nitrogen removal efficiency. Network analysis further clarified the attenuate association between denitrifiers and denitrification-related genes in the plastic-exposed systems, elucidating that MPs and NPs restrained the nitrogen removal by inhibiting the contributions of microorganisms to nitrogen transformation processes. This study provides vital insights into the responses of the microbial community structure and nitrogen conversion processes to micro(nano)plastics disturbance in activated sludge systems.