In this study, we used a metagenomic approach to analyze microbial communities, antibiotic resistance gene diversity, and human pathogenic bacterium composition in two typical landfills in China. Results showed that the phyla Proteobacteria, Bacteroidetes, and Actinobacteria were predominant in the two landfills, and archaea and fungi were also detected. The genera Methanoculleus, Lysobacter, and Pseudomonas were predominantly present in all samples. sul2, sul1, tetX, and adeF were the four most abundant antibiotic resistance genes. Sixty-nine bacterial pathogens were identified from the two landfills, with Klebsiella pneumoniae, Bordetella pertussis, Pseudomonas aeruginosa, and Bacillus cereus as the major pathogenic microorganisms, indicating the existence of potential environmental risk in landfills. In addition, KEGG pathway analysis indicated the presence of antibiotic resistance genes typically associated with human antibiotic resistance bacterial strains. These results provide insights into the risk of pathogens in landfills, which is important for controlling the potential secondary transmission of pathogens and reducing workers’ health risk during landfill excavation.