Background: Insects are associated with microorganisms that contribute to the digestion and processing of nutrients. The European Corn Borer (ECB) is a moth present world-wide, causing severe economical damage as a pest on corn and other crops. In the present work, we give a detailed view of the complexity of the microorganisms forming the ECB midgut microbiota with the objective of comparing the biodiversity of the midgut-associated microbiota and explore their potential as a source of genes and enzymes with biotechnological applications. Methodological/Principal Findings: A high-throughput sequencing approach has been used to identify bacterial species, genes and metabolic pathways, particularly those involved in plant-matter degradation, in two different ECB populations (field-collected vs. lab-reared population with artificial diet). Analysis of the resulting sequences revealed the massive presence of Staphylococcus warneri and Weissella paramesenteroides in the lab-reared sample. This enabled us to reconstruct both genomes almost completely. Despite the apparently low diversity, 208 different genera were detected in the sample, although most of them at very low frequency. By contrast, the natural population exhibited an even higher taxonomic diversity along with a wider array of cellulolytic enzyme families. However, in spite of the differences in relative abundance of major taxonomic groups, not only did both metagenomes share a similar functional profile but also a similar distribution of non-redundant genes in different functional categories. Conclusions/Significance: Our results reveal a highly diverse pool of bacterial species in both O. nubilalis populations, with major differences: The lab-reared sample is rich in gram-positive species (two of which have almost fully sequenced genomes) while the field sample harbors mainly gram-negative species and has a larger set of cellulolytic enzymes. We have found a clear relationship between the diet and the midgut microbiota, which reveals the selection pressure of food on the community of intestinal bacteria.