Thaumarchaeota are responsible for a significant fraction of ammonia oxidation in the oceans and in soils that range from alkaline to acidic. However, the adaptive mechanisms underpinning their habitat expansion remain poorly understood. Here we show that expansion into acidic soils and the high pressures of the hadopelagic zone of the oceans is tightly linked to the acquisition of a variant of the energy-yielding ATPases via horizontal transfer. Whereas the ATPase genealogy of neutrophilic Thaumarchaeota is congruent with their organismal genealogy inferred from concatenated conserved proteins, a common clade of V-type ATPases unites phylogenetically distinct clades of acidophilic/acid-tolerant and piezophilic/piezotolerant species. A presumptive function of pumping cytoplasmic protons at low pH is consistent with the experimentally observed increased expression of the V-ATPase in an acid-tolerant thaumarchaeote at low pH. Consistently, heterologous expression of the thaumarchaeotal V-ATPase significantly increased the growth rate of E. coli at low pH. Its adaptive significance to growth in ocean trenches may relate to pressure-related changes in membrane structure in which this complex molecular machine must function. Together, our findings reveal that the habitat expansion of Thaumarchaeota is tightly correlated with extensive horizontal transfer of atp operons.