This study proposes an innovative setup composed by two stage reactors to achieve biogas upgrading coupling the CO2 in the biogas with external H2 and subsequent conversion into CH4 by hydrogenotrophic methanogenesis. In this configuration, the biogas produced in the first reactor was transferred to the second one, where H2 was injected. This configuration was tested at both mesophilic and thermophilic conditions. After H2 addition, the produced biogas was upgraded to average CH4 content of 89% in the mesophilic reactor and 85% in the thermophilic. At thermophilic conditions, a higher efficiency of CH4 production and CO2 conversion was recorded. The consequent increase of pH did not inhibit the process indicating adaptation of microorganisms to higher pH levels. The effects of H2 on the microbial community were studied using high-throughput Illumina random sequences and full-length 16S rRNA genes extracted from the total sequences. The relative abundance of archaeal community markedly increased upon H2 addition with Methanoculleus as dominant genus. The increase of hydrogenotrophic methanogens and syntrophic Desulfovibrio and the decrease of aceticlastic methanogens indicate a H2-mediated shift toward the hydrogenotrophic pathway enhancing biogas upgrading. Moreover, Thermoanaerobacteraceae were likely involved in syntrophic acetate oxidation with hydrogenotrophic methanogens in absence of aceticlastic methanogenesis.