CO2 molecule chemisorbs selectively on the zigzag tube edge without an activation barrier, whereas it physisorbs on the armchair edge of nanotubes. In addition, carbon nanotubes can be etched by an adsorbed oxygen atom of CO2 molecule. From our results, we suggest a selective etching mechanism for tuning the chirality of the mass-produced carbon nanotubes.