Chemicals from anthropogenic activities such as domestic sewage, pesticide leaching, and improper chemical disposal have caused groundwater contamination. The presence of these emerging contaminants in the aquatic environment can change water quality and biota composition. Thus, this study investigates the effect of two emerging contaminants, anti-inflammatory drug diclofenac (DCF) and antibiotic sulfamethoxazole (SMX), on the aquatic environment, evaluating the phytoplankton community structure. A microcosm experiment was conducted with 16 sampling units, each one with 500 mL of water sample containing phytoplankton exposed to these drugs at different concentrations (0.1, 0.5, and 1.0 mg L
−1
). The experiment lasted 15 days, and samples were collected on days 0, 3, 5, 7, and 14 to evaluate the phytoplankton community, the concentrations of the drugs, and the nutrients in the samples. Six phytoplankton groups were identified, and diatoms and green algae were the most diverse and abundant groups. For the entire community, we identified differences between the days of the experiment, varying in the diversity and density of organisms, but not between the concentrations of the two drugs. Evaluating the groups separately, we identified differences in the abundance of cyanobacteria for the treatment with diclofenac and desmids for the treatment with sulfamethoxazole. We demonstrated that the presence of pharmaceuticals in freshwater ecosystems can somehow affect the phytoplankton community, especially the diversity and abundance of cyanobacteria and desmids. Therefore, our study indicates the importance of evaluating the presence of pharmaceuticals in freshwater ecosystems and their influence on aquatic organisms, as well as pharmaceuticals may be changing the structure of the aquatic environment.