This comprehensive analysis showcases how environmental selection and geographic distance influence the microbiome of subsurface petroleum reservoirs. We reveal substantial differences in the taxonomy of the inhabiting microbes but shared metabolic function between reservoirs with different in situ temperatures and between reservoirs separated by large distances.