Mesoporous carbon nitrides (MCNs) with rod-shaped morphology and tunable nitrogen contents have been synthesized through a calcination-free method by using ethanol-washed mesoporous SBA-15 as templates at different carbonization temperatures. Carbon tetrachloride and ethylenediamine were used as the sources of carbon and nitrogen, respectively. The resulting MCN materials were characterized with low- and high-angle powder XRD, nitrogen adsorption, high-resolution (HR) SEM, HR-TEM, elemental analysis, X-ray photoelectron spectroscopy, and X-ray absorption near-edge structure techniques. The carbonization temperature plays a critical role in controlling not only the crystallinity, but also the nitrogen content and textural parameters of the samples, including specific surface area and specific pore volume. The nitrogen content of MCN decreases with a concomitant increase in specific surface area and specific pore volume, as well as the crystallinity of the samples, as the carbonization temperature is increased. The results also reveal that the structural order of the materials is retained, even after heat treatment at temperatures up to 900 °C with a significant reduction of the nitrogen content, but the structure is partially damaged at 1000 °C. The carbon dioxide adsorption capacity of these materials is not only dependent on the textural parameters, but also on the nitrogen content. The MCN prepared at 900 °C, which has an optimum BET surface area and nitrogen content, registers a carbon dioxide adsorption capacity of 20.1 mmol g at 273 K and 30 bar, which is much higher than that of mesoporous silica, MCN-1, activated carbon, and multiwalled carbon nanotubes.