Inorganic molecularly imprinted polymer (MIP) based on tetraethoxysilane (TEOS), methyl triethoxysilane (MTEOS), and phenyl triethoxysilane (PTEOS) by sol-gel process has been developed. The MIP's preparation conditions, H2O/Si molar ratios (R), template removal procedures, calcination temperatures, and quantity of ammonium hydroxide were investigated. The competition experiments of the MIP for template (caffeine, CAF) and analogue (theophylline, TH) were analyzed by high-performance liquid chromatography (HPLC). The results showed that the Ad(CAF) decreased with an increase of the H2O/Si molar ratios, but the selectivity (alpha) increased with an increase of the H2O/Si molar ratios in the MIP. In addition, in a comparison of the procedures for removing the template, calcination obtained better efficiency and higher selectivity than extraction. The optimum adsorption and selectivity of MIP were obtained with R = 10 and the template was removed by calcination at 600 degrees C. Moreover, the selectivity of the MIP (283.9) was greater than the nonimprinted polymer (2.45) under optimum preparation conditions. (C) 2009 Wiley Periodicals, Inc. J Appl Polym Sci 114: 3994-3999, 2009