Nasal colonization by Staphylococcus aureus is the major risk factor for disease and transmission. Epidemiological studies have reported a reduced risk of S. aureus carriage in immunocompetent but not in immunocompromised children colonized by Streptococcus pneumoniae. We investigate the hypothesis that the immune response to pneumococcal colonization affects S. aureus colonization. We demonstrate that pneumococcal colonization in mice inhibits subsequent S. aureus acquisition in an antibody-dependent manner and elicits antibody that cross-reacts with S. aureus. We identify the staphylococcal target of cross-reactive antibody as 1-pyrroline-5-carboxylate dehydrogenase (P5CDH), and the homologous immunogen in S. pneumoniae as SP_1119, both of which are conserved dehydrogenases. These antigens are necessary and sufficient to inhibit the acquisition of S. aureus colonization in a mouse model. Our findings demonstrate that immune-mediated cross-reactivity between S. pneumoniae and S. aureus protects against S. aureus nasal acquisition and thus reveal a paradigm for identifying protective antigens against S. aureus.