Thalidomide and its derivatives lenalidomide and pomalidomide are important anticancer agents but can cause severe birth defects via an interaction with the protein cereblon. The ligand-binding domain of cereblon is found, with a high degree of conservation, in both bacteria and eukaryotes. Using a bacterial model system, we reveal the structural determinants of cereblon substrate recognition, based on a series of high-resolution crystal structures. For the first time, we identify a cellular ligand that is universally present: we show that thalidomide and its derivatives mimic and compete for the binding of uridine, and validate these findings in vivo. The nature of the binding pocket, an aromatic cage of three tryptophan residues, further suggests a role in the recognition of cationic ligands. Our results allow for general evaluation of pharmaceuticals for potential cereblon-dependent teratogenicity.