The microscopic growth energetics of single-wall carbon nanotubes (SWNTs) with gas-phase CO molecules is investigated. Our density functional calculations show that CO molecules can form carbon networks directly at an open edge of SWNT by adsorption and subsequent desorption procedure. CO molecules adsorb to the carbon atom in an open edge of the SWNT, not through the oxygen atom but through the carbon atom, because the frontier orbital of the CO molecule has more carbon character. Such adsorption results in the formation of a carbon-carbon bond. Formation of a hexagonal carbon ring is thermodynamically more favorable than that of a pentagonal carbon ring and becomes a driving force for the growth of SWNTs. A possible growth mechanism through formation of hexagonal ring structure is suggested from the results of this study. Our results of energy calculations suggest that growth in the direction of a zigzag wall is more favorable. The roles of a catalyst, which nucleates the growth of SWNT and stabilizes an open edge with dangling bonds, are further discussed.