Understanding molecular recognition is of fundamental importance in applications such as therapeutics, chemical catalysis and sensor design. The most common recognition motifs involve biological macromolecules such as antibodies and aptamers. The key to biorecognition consists of a unique three-dimensional structure formed by a folded and constrained bioheteropolymer that creates a binding pocket, or an interface, able to recognize a specific molecule. Here, we show that synthetic heteropolymers, once constrained onto a single-walled carbon nanotube by chemical adsorption, also form a new corona phase that exhibits highly selective recognition for specific molecules. To prove the generality of this phenomenon, we report three examples of heteropolymer-nanotube recognition complexes for riboflavin, L-thyroxine and oestradiol. In each case, the recognition was predicted using a two-dimensional thermodynamic model of surface interactions in which the dissociation constants can be tuned by perturbing the chemical structure of the heteropolymer. Moreover, these complexes can be used as new types of spatiotemporal sensors based on modulation of the carbon nanotube photoemission in the near-infrared, as we show by tracking riboflavin diffusion in murine macrophages.