Abstract: Sol-gel materials for use in chemical sensors were molecularly imprinted for nitroaromatic compounds using a sacrificial spacer template. The template was covalently bonded to the sol-gel matrix during formation, which was then removed to yield a binding pocket with the proper shape and chemical functionality to bind trinitrotoluene (TNT). The sol-gel composition and processing conditions were varied to optimize selectivity for TNT. An equilibrium binding assay involving HPLC was used to measure the affinity of the imprinted sol-gels for TNT versus structural analogues. Infrared spectroscopy and nitrogen adsorption measurements were used in combination with the binding data to evaluate how template type, sol-gel composition, and porosity can be optimized for chemical sensor applications. The use of the imprinted sol-gels to create an optical sensor for TNT will be discussed.