Provided is an integral 3D humic acid-carbon hybrid foam composed of multiple pores and pore walls, wherein pore walls contain single-layer or few-layer humic acid sheets chemically bonded by a carbon material at their edges and have a carbon material-to-humic acid weight ratio from 1/200 to 1/2, wherein the few-layer humic acid sheets have 2-10 layers of stacked substantially hexagonal carbon planes having an inter-plane spacing d002 from 0.3354 nm to 0.40 nm as measured by X-ray diffraction and the single-layer or few-layer humic acid sheets contain 0.01% to 25% by weight of non-carbon elements wherein said humic acid is selected from oxidized humic acid, reduced humic acid, fluorinated humic acid, chlorinated humic acid, brominated humic acid, iodized humic acid, hydrogenated humic acid, nitrogenated humic acid, doped humic acid, chemically functionalized humic acid, or a combination thereof.