The consequences of bacterial infections have been curtailed by the introduction of a wide range of antibiotics. However, infections continue to be a leading cause of mortality, in part due to the evolution and acquisition of antibiotic-resistance genes. Antibiotic misuse and overprescription have created a driving force influencing the selection of resistance. Despite the problem of antibiotic resistance in infectious bacteria, little is known about the diversity, distribution and origins of resistance genes, especially for the unculturable majority of environmental bacteria. Functional and sequence-based metagenomics have been used for the discovery of novel resistance determinants and the improved understanding of antibiotic-resistance mechanisms in clinical and natural environments. This review discusses recent findings and future challenges in the study of antibiotic resistance through metagenomic approaches.