Mucosal-associated invariant T (MAIT) cells are known for their rapid effector functions and antibacterial immune protection. Here, we define the plasticity of interferon-γ (IFN-γ)-producing MAIT1 and interleukin-17A (IL-17A)-producing MAIT17 cell subsets in vivo. Whereas T-bet+ MAIT1 cells remained stable in all experimental settings, after adoptive transfer or acute Legionella or Francisella infection, RORγt+ MAIT17 cells could undergo phenotypic and functional conversion into both RORγt+T-bet+ MAIT1/17 and RORγt-T-bet+ MAIT1 cells. This plasticity ensured that MAIT17 cells played a dominant role in generating antibacterial MAIT1 responses in mucosal tissues. Single-cell transcriptomics revealed that MAIT17-derived MAIT1 cells were distinct from canonical MAIT1 cells yet could migrate out of mucosal tissues to contribute to the global MAIT1 pool in subsequent systemic infections. Human IL-17A-secreting MAIT cells also showed similar functional plasticity. Our findings have broad implications for understanding the role of MAIT cells in combatting infections and their potential utility in MAIT cell-targeted vaccines.