To investigate the pore structural effects on the electrochemical performance of ordered mesoporous carbons (OMCs) as anode materials for sodium ion battery (SIB), we prepared OMCs with various rod lengths from 350nm to 1300nm, and different pore sizes from 4.7nm to 6.5nm by changing the hydrochloric acid concentration in the P123/silica/glycerol composite system. The reversible capacities of OMCs with the average length of 350nm, 700nm, 900nm and 1300nm were 214mAhg−1, 217.4mAhg−1, 232.6mAhg−1, and 228.9mAhg−1 at 50mAg−1, respectively. Furthermore, the OMC with largest pore size (6.5nm) presented the highest capacity and even remained 100mAhg−1 after 1000 cycles at 500mAg−1 with the coulombic efficiency of nearly 100%. We confirmed that the carbon with ordered mesostructure, bigger pore size and shorter length of pore channel exhibited higher capacity. The results propose an effective direction and strategy for designing mesoporous materials to enhance the electrochemical performance of SIB.