Herein, we propose a novel and green strategy to convert crop stalks waste into hierarchical porous carbon composites for electrode materials of lithium-ion batteries. In the method, the sustainable crop stalks, an abundant agricultural byproduct, is recycled and treated by a simple and clean chemical activation process. Afterwards, the obtained porous template is adopted for large-scale production of high-performance anode and cathode materials for lithium-ion batteries. Due to the large surface area, hierarchical porous structures and subsize of the functional particles, the electrode materials manifest excellent electrochemical performance. In particular, the prepared TiO2/C composite presents a reversible specific capacity of 203mAhg−1 after 200 cycles. Our results demonstrate that the sheetlike composites show remarkable cycling stability, high specific capacity and excellent rate ability, and thus hold promise for commercializing the high-performance electrode materials as the advanced lithium-ion batteries.