Ureaplasma urealyticum (U. urealyticum, Uu) is a common sexually transmitted pathogen that is responsible for diseases such as non-gonococcal urethritis, chorioamnionitis, and neonatal respiratory diseases. The rapid emergence of multidrug-resistant bacteria threatens the effective treatment of Uu infections. Considering this, vaccination could be an efficacious medical intervention to prevent Uu infection and disease. As a highly conserved molecular chaperone, DnaJ is expressed and upregulated by pathogens soon after infection. Here, we assessed the vaccine potential of recombinant Uu-DnaJ in a mouse model and dendritic cells. Results showed that intramuscular administration of DnaJ induced robust humoral- and T helper (Th) 1 cell-mediated immune responses and protected against genital tract infection, inflammation, and the pathologic sequelae after Uu infection. Importantly, the DnaJ protein also induced the maturation of mouse bone marrow–derived dendritic cells (BMDCs), ultimately promoting naïve T cell differentiation toward the Th1 phenotype. In addition, adoptive immunization of DnaJ-pulsed BMDCs elicited antigen-specific Immunoglobulin G2 (IgG2) antibodies as well as a Th1-biased cellular response in mice. These results support DnaJ as a promising vaccine candidate to control Uu infections.Key points• A novel recombinant vaccine was constructed against U. urealyticum infection.• Antigen-specific humoral and cellular immune responses after DnaJ vaccination.• Dendritic cells are activated by Uu-DnaJ, which results in a Th1-biased immune response.Supplementary InformationThe online version contains supplementary material available at 10.1007/s00253-022-12230-4.