N-doped highly porous carbons (NHPCs) derived from Victorian brown coal (VBC) were prepared through direct KOH activation in the presence of urea as the N source. Different weight ratios of KOH (VBC-urea mixture: KOH=1:0, 1:1, 1:2, and 1:3) have been used to optimize the porosity of NHPCs. Benefiting from the synergistic effect of the high porosity and N doping, the synthesized material with a high specific surface area of 687 m2/g and the N content at ∼11 at% exhibited a high specific discharge capacity of 604.6 mAh/g at a current density of 0.1 A/g after 100 cycles and a high-rate performance of 245 mAh/g at 3 A/g. The developed material delivered a reversible capacity of 707.7 mAh/g at 0.05 A/g at the end of rate performance. The long-term cycling test performed at 1 A/g illustrates a stable and reversible capacity of 268 mAh/g after 1000 cycles with a coulombic efficiency of 100% and charge retention of 88%. The hierarchically porous carbon matrix with N doping can increase the Li+ diffusion efficiency and accelerate the charge transfer, thus leading to enhanced high-rate performance, superior reversibility, and high cyclic stability.