The receptor ability of diethyl N,N′-(1,3-phenylene)dicarbamate (1) to form host–guest complexes with theophylline (TEO) and caffeine (CAF) by mechanochemistry was evaluated. The formation of the 1–TEO complex (C12H16N2O4·C7H8N4O2) was preferred and involves the conformational change of one of the ethyl carbamate groups of 1 from the endo conformation to the exo conformation to allow the formation of intermolecular interactions. The formation of an N—H...O=C hydrogen bond between 1 and TEO triggers the conformational change of 1. CAF molecules are unable to form an N—H...O=C hydrogen bond with 1, making the conformational change and, therefore, the formation of the complex impossible. Conformational change and selective binding were monitored by IR spectroscopy, solid-state 13C nuclear magnetic resonance and single-crystal X-ray diffraction. The 1–TEO complex was characterized by IR spectroscopy, solid-state 13C nuclear magnetic resonance, powder X-ray diffraction and single-crystal X-ray diffraction.