Uniform yolk-shelled carbon spheres (YS-CSs) with a hierarchically porous nanoarchitecture have successfully been synthesized through a new gradient sol-gel process with surfactant-directing co-assembly by using cationic surfactant cetyltrimethylammonium bromide (CTAB) as a template, resorcinol-formaldehyde (RF) as a carbon source and tetraethoxysilane (TEOS) as an assistant pore-forming agent. The effects of CTAB and TEOS on the yolk-shell structure and pore properties of the carbon spheres are systematically investigated. Characterizations from SEM and HR-SEM, TEM, N2 sorption, FTIR, and TG techniques reveal that the obtained YS-CSs possess a microporous yolk, mesoporous shell and macroporous hollow cavity between the yolk and shell, high specific surface areas (887-1085 m2/g) and large pore volumes (1.4-2.8 cm3/g). Moreover, the yolk diameter can be well controlled from 320 to 600 nm, the shell thickness from 140 to 250 nm and the mesopore size from 4.6 to 10.6 nm by simply adjusting amount of CTAB and TEOS. When evaluated as electrode materials for supercapacitor applications, the YS-CSs exhibit high performance with a high specific capacitance and a good rate capability (75 retention ratio at a high current density of 20 A/g).