Social interactions, such as finding and identifying a mate, often rely on the ability to sense molecular cues carrying information about genetic relationship and individuality. We summarize recent evidence for an unexpected mechanistic link between the immune and olfactory systems in enabling this identification process. In addition to their established role in the immune response, peptide ligands of major histocompatibility complex (MHC) molecules constitute a previously unknown family of social recognition signals detected by specific subsets of sensory neurons in the mammalian nose. This sensing of MHC peptides can be viewed as a form of functional genome analysis by the nose. Behavioral studies in mice and fish show that MHC peptides are accepted as olfactory cues that influence mate choice decisions and selective pregnancy failure. These findings provide a molecular mechanism by which an individual can sense the composition and compatibility of vital immune system molecules of a conspecific, with direct consequences for social behavior.