Enzymatically pre-treated sugarcane bagasse (SCB) was used as substrate for sequential production of hydrogen (H2) and methane (CH4). In stage I, SCB was used by autochthonous bacteria, such as Enterococcus (42.4 % relative abundance) and Paraclostridium (16.8 %) for H2 production (166.8 mL H2/L), while the metabolites accumulated at the end of this stage (9140.5 mg HAc/L) were used by allochthonous inoculum for CH4 production (870.8 mL CH4/L) in stage II. In stage II, hydrogenotrophic (Methanoculleus, 49.1 %) and acetoclastic (Methanosaeta, 15.5 %) archaeal genera were identified and considered important to maintain low H2 pressure in the system. According to gene inference, the hydrolysis of the SCB fiber was performed in both stages, as potential β-glucosidase and 1,4-β-xylosidase encoding genes were predicted. However, the energy metabolism of microbial populations differed, as potential genes involved in CH4 metabolism were predominant in phase II (39.0 %).