Despite the substantial amount of research on the presence of pharmaceuticals and illicit drugs (PhIDs) in freshwater environments, there is a paucity of data on these contaminants in estuarine systems, particularly in South America. Industries, the biggest port in the Southern Hemisphere, and substantial urban areas surround the Santos-São Vicente Estuarine System (SSVES), located in a Brazilian subtropical area. This study constitutes the first assessment of contamination by PhIDs in this estuarine area. Samples of superficial water, sediments, and oysters were analyzed through liquid chromatography-tandem mass spectrometry (LC-MS/MS). Furthermore, the potential ecological risk to aquatic non-target organisms (i.e., primary producers, primary and secondary consumers) was assessed using the maximum measured environmental concentrations (MEC) of the PhIDs identified in this study. The results revealed the widespread presence of caffeine (MEC = 72.1 ng·L-1) > losartan (29.6 ng·L-1) > orphenadrine (25.9 ng·L-1) > benzoylecgonine (18.6 ng/L-1) > carbamazepine (7.4 ng·L-1) and cocaine (3.6 ng·L-1). These findings were obtained from relevant sites at SSVES, near areas with mangroves and anthropogenic activities, such as fishing and swimming. Consequently, the ecological risk assessment indicated significant environmental concern, as our results suggested low to moderate risks of all compounds to algae, crustaceans, and/or fish. Considering the One Health approach, further studies are recommended to investigate the potential human health risks associated with consuming contaminated seafood. Concomitantly, there is an urgent need for improvements in public sanitation, public health care for illicit drug users, and public safety actions against traffic.