Incorporating selenium into high-surface-area carbon with hierarchical pores, derived from red kidney bean peels via simple carbonization/activation, yields a superior Li–Se battery cathode material. This method produces a carbon framework with 568 m2 g−1 surface area, significant pore volume, and improves the composite’s electronic conductivity and stability by mitigating volume changes and reducing lithium polyselenide dissolution. The Se@ACRKB composite, containing 45 wt% selenium, shows high discharge capacities (609.13 mAh g−1 on the 2nd cycle, maintaining 470.76 mAh g−1 after 400 cycles at 0.2 C, and 387.58 mAh g−1 over 1000 cycles at 1 C). This demonstrates exceptional long-term stability and performance, also applicable to Na–Se batteries, with 421.36 mAh g−1 capacity after 200 cycles at 0.1 C. Our study showcases the potential of using sustainable materials for advanced battery technologies, emphasizing cost-effective and scalable solutions for energy storage.