This study addresses the occurrence of carbamazepine and diazepam and their metabolites in the wastewater of the University Hospital (HUSM) of the Federal University of Santa Maria, RS-Brazil. Samples were collected from three sampling points of the sewage treatment system: point A ('emergency effluent'), point B ('general effluent') and point C ('water course-receptor'). Eight metabolites were identified: carbamazepine-10-11-epoxide, 10-dihydro-carbamazepine, 2-OH-carbamazepine, iminoquinone, acridone, nordiazepam, oxazepam and temazepam. The mean concentrations in the emergency, general effluent and water course-receptor were as follows: 433.0 ± 4.7, 349.0 ± 5.0 and 485.0 ± 5.6 ng L(-1), for carbamazepine and 550.0 ± 4.3, 441.0 ± 7.9 and 586.6 ± 9.3 ng L(-1), for diazepam, respectively. Liquid chromatography with electrospray ionization tandem mass spectrometry (LC-QqLIT-MS) proved to be a method fit-to-purpose. The determination of carbamazepine and diazepam, and the identification of active metabolites showing environmental persistence (carbamazepine-10-11-epoxide, nordiazepam and oxazepam) revealed the need for a more effective treatment of the HUSM effluent. As far as we know, no similar study has been carried out on the wastewater of Brazilian hospitals.