Leachate is produced from sanitary landfills containing various pollutants, including heavy metals. This study aimed to determine the resistance of bacteria isolated from non-active sanitary landfill leachate to various heavy metals and the effect of salinity levels on the removal of Hg by the isolated bacterium. Four dominant bacteria from approximately 33 × 1017 colony-forming units per mL identified as Vibrio damsela, Pseudomonas aeruginosa, Pseudomonas stutzeri, and Pseudomonas fluorescens were isolated from non-active sanitary landfill leachate. Heavy metal resistance test was conducted for Hg, Cd, Pb, Mg, Zn, Fe, Mn, and Cu (0–20 mg L− 1). The removal of the most toxic heavy metals by the most resistant bacteria was also determined at different salinity levels, i.e., fresh water (0‰), marginal water (10‰), brackish water (20‰), and saline water (30‰). Results showed that the growth of these bacteria is promoted by Fe, Mn, and Cu, but inhibited by Hg, Cd, Pb, Mg, and Zn. The minimum inhibitory concentration (MIC) of all the bacteria in Fe, Mn, and Cu was > 20 mg L− 1. The MIC of V. damsela was 5 mg L− 1 for Hg and > 20 mg L− 1 for Cd, Pb, Mg, and Zn. For P. aeruginosa, MIC was > 20 mg L− 1 for Cd, Pb, Mg, and Zn and 10 mg L− 1 for Hg. Meanwhile, the MIC of P. stutzeri was > 20 mg L− 1 for Pb, Mg, and Zn and 5 mg L− 1 for Hg and Cd. The MIC of P. fluorescens for Hg, Pb, Mg, and Zn was 5, 5, 15, and 20 mg L− 1, respectively, and that for Cd was > 20 mg L− 1. From the MIC results, Hg is the most toxic heavy metal. In marginal water (10‰), P. aeruginosa FZ-2 removed up to 99.7% Hg compared with that in fresh water (0‰), where it removed only 54% for 72 h. Hence, P. aeruginosa FZ-2 is the most resistant to heavy metals, and saline condition exerts a positive effect on bacteria in removing Hg.