A photoresponsive molecularly imprinted polymer (MIP) material is successfully fabricated from an azobenzene-based functional monomer, 4-[(4-methacryloyloxy)phenylazo]benzoic acid (MPABA), using caffeine as a molecular template. The trans–cis photoisomerization properties of MPABA are retained after incorporation into the rigid 3D crosslinked polymer matrix. Substrate affinity of the MIP receptor sites is photoswitchable. This can be attributed to the photoisomerization of azobenzene chromophores within the MIP receptors, resulting in the alteration of their geometry and the spatial arrangement of their binding functionalities. The favorable binding constant of the MIP receptors for caffeine is 5.48 × 104 M–1 in dimethylsulfoxide. The density of the caffeine-specific receptor sites in the MIP material is 0.95 μmol (g MIP)–1. Upon irradiation at 365 nm, 58.3 % of receptor-bound caffeine is released from the MIP material. Subsequent irradiation at 440 nm causes 96.4 % of the released caffeine to be rebound by the MIP material. This near-quantitative uptake of the released caffeine is evidence of the reversibility of the receptor-site configuration and substrate affinity during the photoswitching of the azobenzene chromophores. Although the photoregulated substrate release and uptake processes are generally repeatable, a gradual reduction in the extent of substrate release and rebinding is observed. This may be caused by the slow deformation of MIP receptors during the course of repetitive photoswitching. The results of this work demonstrate the potential of stimuli-responsive MIP materials as smart chemicals and as drug-delivery systems.