Coastal wetlands are ecosystems associated with intense carbon dioxide (CO2), methane (CH4) and nitrous oxide (N2O) recycling, modulated by salinity and other environmental factors that influence the microbial community involved in greenhouse gases production and consumption. In this study, we evaluated the influence of environmental factors on GHG concentration and benthic microbial community composition in coastal wetlands along the coast of the semiarid region. Wetlands were situated in landscapes along a south-north gradient of higher aridity and lower anthropogenic impact. Our results indicate that wetlands have a latitudinal variability associated with higher organic matter content at the north, especially in summer, and higher nutrient concentration at the south, predominantly in winter. During our sampling, wetlands were characterized by positive CO2 μM and CH4 nM excess, and a shift of N2O nM excess from negative to positive values from the north to the south. Benthic microbial communities were taxonomically diverse with > 60 phyla, especially in low frequency taxa. Highly abundant bacterial phyla were classified into Gammaproteobacteria (Betaproteobacteria order), Alphaproteobacteria and Deltaproteobacteria, including key functional groups such as nitrifying and methanotrophic bacteria. Generalized additive model (GAM) indicated that conductivity accounted for the larger variability of CH4 and CO2, but the predictions of CH4 and CO2 concentration were improved when latitude and pH concentration were included. Nitrate and latitude were the best predictors to account for the changes in the dissolved N2O distribution. Structural equation modeling (SEM), illustrated how the environment significantly influences functional microbial groups (nitrifiers and methane oxidizers) and their resulting effect on GHG distribution. Our results highlight the combined role of salinity and substrates of key functional microbial groups with metabolisms associated with both carbon and nitrogen, influencing dissolved GHG and their potential exchange in natural and anthropogenically impacted coastal wetlands.