Nanomaterials, with their small size, surface characteristics, and antibacterial properties, are extensively employed across environmental, energy, biomedical, agricultural, and other industries. This study examined the antibacterial efficacy of magnesium hydroxide (Mg(OH)2) nanoparticles (NPs) against sulfate-reducing bacteria (SRB) within sediments. The inhibitory effects of two types of Mg(OH)2 NPs with distinct particle sizes (20.3 and 29.6 nm) and concentrations (0–10.0 mg/mL) were examined under optimal treatment conditions. The antibacterial mechanisms of Mg(OH)2 NPs through direct contact and dissolution effects were determined. The results revealed a correlation between the concentration, particle size, and inhibitory activity, with the smallest NPs (20.3 nm) at the highest concentration (10.0 mg/mL) substantially reducing SRB counts from 8.77 ± 0.18 to 6.48 ± 0.13 log10 colony forming units/mL after 6 h treatment. Treatment with high concentrations of Mg(OH)2 NPs induced cellular damage, reduced intracellular lactate dehydrogenase activity, and elevated intracellular catalase activity and H2O2 content, suggesting that the contact effect of NPs stimulated SRB. This leads to oxidative stress response and structural damage to the cell membrane, which has emerged as the primary driver of the antibacterial action of Mg(OH)2 NPs. This study presents a novel nanomaterial that can inhibit and control SRB in natural sedimentary environments.