Wastewater treatment plants (WWTPs) are an important source of pharmaceuticals in surface water, but information about their transformation products (TPs) is very limited. Here, we investigated occurrence and transformation of pharmaceuticals and TPs in WWTPs and receiving rivers by using suspect and non-target analysis as well as target analysis. Results showed identification of 113 pharmaceuticals and 399 TPs, including mammalian metabolites (n = 100), environmental microbial degradation products (n = 250), photodegradation products (n = 44) and hydrolysis products (n = 5). The predominant parent pharmaceuticals (n = 37) and transformation products (n = 68) were mainly derived from antimicrobials, accounting for 32.7 % and 17.0 %, respectively. The identified compounds were found in the influent (387-428) and effluent (227-400) of WWTPs, as well as upstream (290-451) and downstream (322-416) of receiving rivers, most predominantly from antimicrobials, followed by analgesic and antipyretic drugs. A total of 399 identified TPs were transformed by 110 pathways, of which the oxidation reaction was predominant (27.0 %), followed by photodegradation reaction (10.7 %). Of the 399 TPs, 49 (with lower PNECs) were predicted to be more toxic than their parents. Compounds with potential high risks (hazard quotient >1 and risk index (RI) > 0.1) were found in the WWTP influent (126), effluent (53) and river (61), and the majority were from the antimicrobial and antihypertensive classes. In particular, the potential risks (RI) of TPs from roxithromycin and irbesartan were found higher than those for their corresponding parents. The findings from this study highlight the need to monitor TPs from pharmaceuticals in the environment.