The reaction process of methanol to hydrocarbons was studied by means of in situ FTIR spectroscopic technique. The interaction between methanol and HZSM-5 surface was determined under different reaction conditions. It was found that the Lewis acid sites on the HZSM-5 surface played an important role in the conversion of methanol to hydrocarbons. During the catalysis process, methanol was adsorbed on the Lewis acid sites through chemical bond which was stronger than the interaction between methanol and the Brønsted acid sites. The dehydration of methanol took place on the Lewis acid sites to form the intermediate, dimethyl ether. According to the experimental results, the elaborate mechanism of methanol to hydrocarbons conversion was discussed.