Abstract Increasing mortality, morbidity and economic costs have been paid to pneumococcal diseases every year. Currently, vaccination is the most promising strategy to reduce the occurrence of pneumococcal infection. In this study, we investigated the protective efficacy of immunization with recombinant DnaJ (hsp40) protein against infections of different serotypes of Streptococcus pneumoniae. We demonstrated that mucosal immunization with DnaJ antigen could induce both systemic and mucosal antibodies for DnaJ and stimulate the release of high levels of IL-10, IFN-γ and IL-17A. Moreover, this mucosal vaccination could reduce nasal or lung colonization of pneumococcus and elicit protection against different serotypes of invasive pneumococcal infections. As well, we found that intraperitoneal immunization with DnaJ could also protect against invasive infections caused by different serotypes of pneumococcus, and passive immunization with antibodies specific for DnaJ confirmed that this protection was antibody-mediated. Our results therefore support the potential of DnaJ as a conserved pneumococcal protein vaccine.