A series of brucite-like materials, undoped and doped zinc layered hydroxide nitrate with 2% (molar) Fe3+, Co2+ and Ni2+ were synthesized. Organic–inorganic nanohybrid material with gallate anion as a guest, and zinc hydroxide nitrate, as an inorganic layered host was prepared by the ion-exchange method. The nanohybrid materials were heat-treated at various temperatures, 400–700 °C. X-ray diffraction, thermal analysis and also Fourier transform infrared results showed that incorporation of the doping agents within the zinc layered hydroxide salt layers has enhanced the heat-resistivity of the nanohybrid materials in the thermal decomposition pathway. Porous carbon materials can be obtained from the heat-treating the nanohybrids at 600 and 700 °C. Calcination of the nanohybrids at 700 °C under nitrogen atmosphere produces mesoporous and high pore volume carbon materials.