Nitrogen-containing mesoporous carbons with the use of colloidal silica spheres of (14 nm) and chitosan as a carbon precursor were obtained. A removal of such small template particles from carbonized silica-chitosan composite is difficult and HF with a minimum concentration of 15 wt% should be used. By varying the silica-to-chitosan ratio, the porous characteristic of products is controlled. The modification by ZnCl 2 with a molar Zn-to-C (in chitosan mass) ratio of '6' results in the development of microporosity; however it is accompanied by a significant reduction of mesopore volume (V mes ). The addition of ZnCl 2 in a ratio of '5.25' and pH adjustment to 5.8 increase the volumes of micropores, small mesopores, BET surface area to 1975 m 2 /g, and preserve V mes of 4.15 cm 3 /g. The novelty of the presented strategy is the creation of microporosity in the hard-templated materials by incorporating ZnCl 2 into the mixture of Ludox HS-40 template and chitosan precursor, as well as the investigation on how the pH of synthesis influences the final porosity. The pH of a silica-chitosan-zinc solution, equal to 3.9, provides some coordination of Zn 2+ by -OH and -NH 2 groups, whereas pH adjustment to 5.8 results in the precipitation of a new template-Zn(OH) 2 .