Metritis is a uterine disease that affects 10 to 30% of all lactating dairy cows and has detrimental effects on reproductive performance, milk production, and survival. Data regarding the identity and abundance of bacterial genes governing traits such as virulence, antibiotic resistance, and stress responses could enable identification of previously unknown agents that play a role in metritis pathogenesis. Moreover, such knowledge could lead to the development of improved treatments or preventive methods. Therefore, the objectives of this study were to characterize the uterine microbial population and to differentiate, for the first time, the microbial functional diversity in cows with metritis versus healthy cows. In addition, we aimed to identify relationships between microbial genes and postpartum uterine health. Uterine swabs were collected from 24 cows within 3 to 12 d in milk; 12 cows were diagnosed with metritis and the other 12 were healthy. Metritis was defined as a watery, reddish or brownish uterine discharge having a fetid smell, and rectal temperature greater than 39.5°C. Cows with a clear and viscous uterine discharge, not fetid or mucopurulent, were classified as healthy. Microbial metagenomic DNA from uterine swab samples was subjected to whole-genome shotgun sequencing on the Illumina MiSeq platform (Illumina Inc., San Diego, CA). The MG-RAST server (metagenomic rapid annotations using subsystems technology; http://metagenomics.anl.gov/) and STAMP software (http://kiwi.cs.dal.ca/Software/STAMP) were used to detect statistically significant differences in the abundance of taxonomic and functional features between the uterine microbial metagenomes of metritic and healthy cows. Our results showed an increased abundance of Fusobacteria and Bacteroidetes in metritic cows, confirming the potential role of those 2 taxa in the pathogenesis of metritis. The MG-RAST analysis revealed a significantly higher abundance of genes for protein transport across the cytoplasmic membrane and type VI bacterial secretion systems in the metritic microbiota. Additionally, genes coding for resistance to acid stress were exclusive to the metritis microbiota, suggesting that microbial resistance to acid stress is important for microbial survival in the infected uterus. On the other hand, genes coding for adhesion molecules, bacteriocins, and antibacterial peptides were significantly associated with the uterine microbiota of healthy cows, as was tolerance to colicin E2.