We present the X-ray spectral analysis of the 1855 extragalactic sources in the Chandra COSMOS-Legacy survey catalog having more than 30 net counts in the 0.5-7 keV band. 38% of the sources are optically classified Type 1 active galactic nuclei (AGN), 60% are Type 2 AGN and 2% are passive, low-redshift galaxies. We study the distribution of AGN photon index and of the intrinsic absorption N(H,z) based on the sources optical classification: Type 1 have a slightly steeper mean photon index than Type 2 AGN, which on the other hand have average intrinsic absorption ~3 times higher than Type 1 AGN. We find that ~15% of Type 1 AGN have N(H,z)>1E22 cm^(-2), i.e., are obscured according to the X-ray spectral fitting; the vast majority of these sources have L(2-10keV)>$1E44 erg/s. The existence of these objects suggests that optical and X-ray obscuration can be caused by different phenomena, the X-ray obscuration being for example caused by dust-free material surrounding the inner part of the nuclei. ~18% of Type 2 AGN have N(H,z)<1E22 cm^(-2), and most of these sources have low X-ray luminosities (L(2-10keV)<$1E43 erg/s). We expect a part of these sources to be low-accretion, unobscured AGN lacking of broad emission lines. Finally, we also find a direct proportional trend between N(H,z) and host galaxy mass and star formation rate, although part of this trend is due to a redshift selection effect.