Sugarcane bagasse, a waste product of the sugarcane industry can be used as a precursor for the preparation of carbon. In this study, a composite consisting of hierarchically functionalized porous carbon (FPC) and β-FeOOH was synthesized via a simple and effective hydrolysis method. The hydrothermal process before the carbonization and activation of the bagasse maintained the hierarchical interconnected porous structure of the sugarcane bagasse. A nitric acid (HNO3) functionalization treatment enabled an in-situ growth of β-FeOOH on the hierarchically structured bagasse. When tested as an anode for lithium-ion batteries, the obtained FPC/β-FeOOH composite showed a high discharge capacity of 898.8 mAh g−1 at 0.2 A g−1 after 350 cycles and achieved a specific capacity of 446.1 mAh g−1 at a current rate of 1 A g−1 after 1000 cycles together with a remarkable coulombic efficiency of 99.9%. This excellent electrochemical performance of the FPC/β-FeOOH composite can be attributed to the synergistic effect of the interconnected porous structure of porous carbon and the electrochemically active tunnel type β-FeOOH nanorods. The strategy developed here is promising in design and fabrication of other composites having interconnected porous structures with high performance.