The research presented in this thesis supports the hypothesis that wastewater-based epidemiology (WBE) approach can be used as an alternative and non-intrusive technique that provides information about a population’s health and lifestyle habits. The focus is in the essential role of analytical chemistry in the development of advanced methodology for the reliable determination of illicit drugs, and also other licit and illicit substances, in the aquatic environment. To this end, liquid chromatography hyphenated to different mass spectrometers, employing both low and high resolution, and using target and suspect acquisition strategies, have been investigated. The results obtained in chapter 2 tackled different analytical challenges affecting the monitoring of illicit drugs, such as the inclusion of cannabis or new psychoactive substances in WBE studies, or the lack of WBE data from different world regions. In chapters 3 and 4, the aim was to go a little further and extrapolate the WBE approach to including other pharmaceuticals with potential for abuse, such as counterfeit medicines, and (il)licit substances used in the sport doping context. To this aim, two new analytical methods were developed, validated and applied to wastewater samples. This work contributed to the maturation of WBE as a complimentary epidemiological source of information, so that authorities can have a better picture of the prevalence of illicit drugs or other known compounds in a specified area or group, albeit at the (averaged) group level. In addition, the approach appeared to be successful for tracking the use of rogue pharmacies and counterfeit medication