Purines and their derivatives are key molecules for controlling intracellular energy homeostasis and nucleotide synthesis. In eukaryotes, including humans, purines also act as signaling molecules that mediate extracellular communication and control key cellular processes, such as proliferation, migration, differentiation, and apoptosis. However, the signaling role of purines in bacteria is largely unknown. Here, by combining structural and sequence information, we define a purine-binding motif, which is present in sensor domains of thousands of bacterial receptors that modulate motility, gene expression, metabolism and second messenger turnover. The screening of compound libraries and microcalorimetric titrations of selected sensor domains validated their ability to specifically bind purine derivatives. The physiological relevance of purine sensing was demonstrated in a second messenger signaling system that modulates c-di-GMP levels.