A general solvent-free assembly approach via directly heating amino acid and mesoporous silica mixtures is developed for the synthesis of a family of highly nitrogen-doped mesoporous carbons. Amino acids have been used as the sole precursors for templating synthesis of a series of ordered mesoporous carbons. During heating, amino acids are melted and strongly interact with silica, leading to effective loading and improved carbon yields (up to ≈25 wt%), thus to successful structure replication and nitrogen-doping. Unique solvent-free structure assembly mechanisms are proposed and elucidated semi-quantitatively by using two affinity scales. Significantly high nitrogen-doping levels are achieved, up to 9.4 (16.0) wt% via carbonization at 900 (700) °C. The diverse types of amino acids, their variable interactions with silica and different pyrolytic behaviors lead to nitrogen-doped mesoporous carbons with tunable surface areas (700–1400 m2 g−1), pore volumes (0.9–2.5 cm3 g−1), pore sizes (4.3–10 nm), and particle sizes from a single template. As demonstrations, the typical nitrogen-doped carbons show good performance in CO2 capture with high CO2/N2 selectivities up to ≈48. Moreover, they show attractive performance for oxygen reduction reaction, with an onset and a half-wave potential of ≈−0.06 and −0.14 V (vs Ag/AgCl).