In situ X-ray absorption near edge structure (XANES) measurements were conducted to elucidate the chemical states of Co and Ni catalysts during single-walled carbon nanotube (SWCNT) growth via chemical vapor deposition (CVD). XANES spectra indicated that both Co and Ni catalysts partially oxidized before heating. It was found that Co catalysts formed carbides during the SWCNT growth. In contrast, Ni catalysts remained metallic state even after the SWCNT growth had begun. These results indicate that during SWCNT growth, carbon atoms dissolve into Co particles, whereas for Ni particles, they diffuse on the surface region. It was concluded that the growth mechanisms of SWCNTs formed by CVD differed for either Co or Ni catalyst.