Lagoon systems are often confined, and their waters are poorly renewed, which makes them vulnerable to pollutants’ accumulation. Here, the impact of different sources of anthropogenic contamination (domestic, urban, industrial, and agricultural) on the nitrate (NO3−) content, emission of the greenhouse gas nitrous oxide (N2O), abundance of total bacterial archaeal, nitrifying, and denitrifying communities, and diversity and composition of bacterial communities in the sediments of the RAMSAR-protected Marchica lagoon (Nador, Morocco) was investigated. Six lake sites differing in NO3− concentration were selected. Wastewater coming from industrial activities results in the greatest concentration of NO3− in sediments and emissions of N2O. Increased carbon to nitrogen content in sites near domestic activities resulted in an increase in the abundance of total bacterial and archaeal communities, as well as nitrification and denitrification genes, but low N2O emissions due to a greater presence of microorganisms involved in N2O production over those able to reduce N2O. Significant differences in bacterial community composition between sites were observed, with the NO3− content being the main driver of these changes. Increased NO3− content in the sampling sites significantly reduced bacterial diversity. Bacterial genera involved in the degradation of organic and inorganic pollutants and nitrous oxide reduction, such as Robiginitalea, Symbiobacterium, Bacillus, Fusibacter, Neptunomonas, Colwellia, and Alteromonas, were the most abundant in the lagoon. The results suggest that the type of anthropogenic contamination directly impacts the nitrate content in the sediments of the Marchica lagoon, which determines variations in nitrous oxide emissions, nitrogen-cycling gene abundances, and bacterial diversity.