Theory of the CO infrared absorption band of carbonmonoxyheme proteins is developed using results of the theory of optical absorption bandshape of impurity center in crystal. It is shown that the bandshape is controlled by electrostatic interaction to the polar or/and charged heme surrounding. Analysis of the CO bands of different heme proteins brings us to conclusion, that the CO band is broadened by very slow (τ > 10 ps) motions of the heme surrounding and this motion most probably corresponds to the slow collective motion of the protein molecule. Therefore the second moment of the band must depend linearly on temperature at T > 25 K if the heme surrounding moves harmonically. The motion of the protein formed surrounding of the heme is arrested by the glassy protein environment. It is shown that Gaussian is the only possible symmetric shape of the CO band, if the heme surrounding moves harmonically. Deviation from this bandshape is a manifestation of anharmonic character of the surrounding motion. In general, CO infrared absorption band is shown to be an excellent probe of the dynamics of the heme surrounding.