High specific surface area, reasonable pore structure and heteroatom doping are beneficial to enhance charge storage, which all depend on the selection of precursors, activators and reasonable preparation methods. Here, B, O and N codoped biomass-derived hierarchical porous carbon was synthesized by using KCl/ZnCl2 as a combined activator and porogen and H3BO3 as both boron source and porogen. Moreover, the cheap, environmentally friendly and heteroatom-rich laver was used as a precursor, and impregnation and freeze-drying methods were used to make the biological cells of laver have sufficient contact with the activator so that the layer was deeply activated. The as-prepared carbon materials exhibit high surface area (1514.3 m2 g−1), three-dimensional (3D) interconnected hierarchical porous structure and abundant heteroatom doping. The synergistic effects of these properties promote the obtained carbon materials with excellent specific capacitance (382.5 F g−1 at 1 A g−1). The symmetric supercapacitor exhibits a maximum energy density of 29.2 W h kg−1 at a power density of 250 W kg−1 in 1 M Na2SO4, and the maximum energy density can reach to 51.3 W h kg−1 at a power density of 250 W kg−1 in 1 M BMIMBF4/AN. Moreover, the as-prepared carbon materials as anode for lithium-ion batteries possess high reversible capacity of 1497 mA h g−1 at 1 A g−1 and outstanding cycling stability (no decay after 2000 cycles).