A green and sustainable approach was employed to synthesize N, O-codoped porous carbon nanorods with two-end-open characteristics. In this method, a crab shell was utilized as a template and activator, while egg white served as a carbon precursor. The resulting carbon nanorods sintered at 700 °C (CNRs-700), exhibited cross-linked pore channels, a high surface area, and abundant defects and active sites. These features imparted superior energy storage properties to the material, enabling its application as both an anode for lithium-ion batteries and a supercapacitor. The CNRs-700 demonstrated an exceptional lithium storage capacity of 530.6 mAh g−1 at 2 A g−1, corresponding to 90.1% of the capacity achieved at 100 mA g−1, which is ascribed to the pseudocapacitive contribution. Furthermore, in an evaluation combining a three-electrode configuration in KOH electrolyte at a high current density of 50 A g−1, the CNRs-700 retained a specific capacitance of 140 F g−1. For symmetrical supercapacitors based on CNRs-700 in 1 M Na2SO4 electrolyte, the energy density reached 27.1 Wh kg−1 at a 375 W kg−1 power density, demonstrating remarkable cyclability over 10,000 consecutive cycles. The superior rate performance and cycling stability would accentuate the suitability of the biomass-derived carbon materials for such systems. [ABSTRACT FROM AUTHOR]