Ability to directly sequence DNA from the environment permanently changed microbial ecology. Here, we review the new insights to microbial life gleaned from the applications of metagenomics, as well as the extensive set of analytical tools that facilitate exploration of diversity and function of complex microbial communities. While metagenomics is shaping our understanding of microbial functions in ecosystems via gene-centric and genome-centric methods, annotating functions, metagenome assembly and binning in heterogeneous samples remains challenging. Development of new analysis and sequencing platforms generating high-throughput long-read sequences and functional screening opportunities will aid in harnessing metagenomes to increase our understanding of microbial taxonomy, function, ecology, and evolution in the environment.