BACKGROUNDMedical substances are utilized around the world, and their accumulation in nature is a global concern. This work aimed to identify three priority pharmaceuticals discharged into the domestic sewage stream of Astana city (Kazakhstan). Samples of municipal wastewater were taken before and after the wastewater treatment plant (WWTP) over a period of 13 months. The performed experiments demonstrated that there are seasonal variations in the priority pharmaceuticals – carbamazepine (CBZ), sulfamethoxazole (SMX) and aspirin (ASP) – identified in the wastewaters.RESULTSThe non‐conventional WWTP of Astana city, which includes a sequence of treatment processes, showed 2–100% removal of these compounds with the following influent concentrations from the entering stream: 12.5–185.6 ppb (μg L−1) for CBZ, 2.6–51.2 ppb for SMX and 1.9–199.8 ppb for ASP. Laboratory‐scale experiments revealed that the application of the membrane separation technique, i.e. ultrafiltration, is able to provide improved removal of these pharmaceuticals. The removal of ASP, CBZ and SMX by phase inversion polyethersulfone and track etch (TE) polycarbonate membranes was investigated. Filtration with TE membrane demonstrated 39–97% removal of the primary pharmaceuticals from the wastewater.CONCLUSIONFiltration with TE membrane was recognized as an affordable and efficient supplementary treatment step. The addition of the TE separation process in the Astana WWTP could potentially improve the removal of the studied pharmaceuticals along with other medical substances. The reported results hold substantial significance, particularly for rapidly expanding urban centers and developing nations. This is especially crucial as there is a scarcity of data regarding the treatment of pharmaceuticals in municipal wastewater for these regions. © 2024 Society of Chemical Industry (SCI).