Preparation of hierarchically porous, heteroatom-rich nanostructured carbons through green and scalable routes plays a key role for practical energy storage applications. In this work, naturally abundant lignocellulosic agricultural waste with high initial oxygen content, hazelnut shells, were hydrothermally carbonized and converted into nanostructured ‘hydrochar’. Environmentally benign ceramic/magnesium oxide (MgO) templating was used to introduce porosity into the hydrochar. Electrochemical performance of the resulting material (HM700) was investigated in aqueous solutions of 1M H2SO4, 6M KOH and 1M Na2SO4, using a three-electrode cell. HM700 achieved a high specific capacitance of 323.2 F/g in 1M H2SO4 (at 1 A/g, −0.3 to 0.9V vs. Ag/AgCl) due to the contributions of oxygen heteroatoms (13.5wt%) to the total capacitance by pseudo-capacitive effect. Moreover, a maximum energy density of 11.1Wh/kg and a maximum power density of 3686.2W/kg were attained for the symmetric supercapacitor employing HM700 as electrode material (1M Na2SO4, ΔE =2V), making the device promising for green supercapacitor applications.