Lakes in arid regions are experiencing mercury pollution via air deposition and surface runoff, posing a threat to ecosystem safety and human health. Furthermore, salinity and organic matter input could influence the mercury cycle and composition of bacterial communities in the sediment. In this study, the effects of salinity and algae biomass as an important organic matter on the genes (merA and hgcA) involved in the mercury cycle under mercury contamination were investigated. Archaeal merA and hgcA were not detected in sediments of lake microcosms, indicating that bacteria rather than archaea played a crucial role in mercury reduction and methylation. The high content of mercury (300ngg-1) could reduce the abundance of both merA and hgcA. The effects of salinity and algae biomass on mercury cycling genes depended on the gene type and dose. A higher input of algae biomass (250mgL-1) led to an increase of merA abundance, but a decrease of hgcA abundance. All high inputs of mercury, salinity, and algae biomass decreased the richness and diversity of bacterial communities in sediment. Further analysis indicated that higher mercury (300ngg-1) led to an increased relative abundance of mercury methylators, such as Ruminococcaceae, Bacteroidaceae, and Veillonellaceae. Under saline conditions (10 and 30gL-1), the richness of specific bacteria associated with mercury reduction (Halomonadaceae) and methylation (Syntrophomonadaceae) increased compared to the control. The input of algae biomass led to an increase in the specific bacterial communities associated with the mercury cycle and the richness of bacteria involved in the decomposition of organic matter. These results provide insight into mercury cycle-related genes and bacterial communities in the sediments of lakes in arid regions.