Nanoporous carbon matrix was prepared by the sol-gel process from pyrogallol-formaldehyde (PF) mixtures in water using picric acid as catalyst. For the second sample, nickel oxide nanoparticles were added in the PF matrix to get a PF/NiO hybrid nanocomposite. The samples were heat treated at the pyrolysis temperature of 650 °C for two hours. The obtained materials have been characterized by different techniques such as: X-ray diffraction (XRD), scanning electron microscope (SEM), transmission electron microscopy (TEM), thermogravimetric analysis (TGA), differential thermalanalysis (DTA),nitrogen adsorption-desorption isotherms, voltage-current characteristics, electrochemical measurementsand UV-Vis-IR absorption. The XRD analysis shows that PF matrix is amorphous while PF/NiO nanocomposite exhibited a metallic phase of nickel. The SEM and TEM images indicated the presence of nickel particles in the PF/NiO nanocomposite which are dispersed randomly in the carbon matrix. The adsorption-desorption of nitrogen revealed that the PF matrix is microporous and the PF/NiO nanocomposite is mesoporous. The adsorption capacities of carbon dioxide (CO2) and methane (CH4) show that the PF matrix has the highest adsorption at low pressures and the PF/NiO nanocomposite tends to adsorb gasesbetter at high pressure. The V(I) characteristics showed that the PF/NiO nanocomposite can be considered as a smart material. Indeed, the characteristic behavior can be adjusted according to the maximum applied current. Electrochemical measurements have shown that the PF/NiO nanocomposite is very promising for the detection of non-enzymatic glucose. The absorption spectra showed that the addition of the NiO nanoparticles increased the disorder.The obtained materials are promoters for various applications such as gas storage, negatronic devices and glucose sensor.