Lysine lactylation is a crucial posttranslational modification (PTM) that regulates protein function. Here, this study revealed that L-lactic acid promotes host immune response and inhibits viral infection by inducing Interferon Regulatory Factor 9 (IRF9) L-lactylation. We first found L-lactylation modification (L-Kla) of IRF9 mediated by AARS1. Further studies demonstrated that IRF9 L-lactylation potentiates type I interferon (IFN-I) signaling by promoting IRF9–STAT2 interaction, thereby boosting antiviral immune response. Intriguingly, L-lactic acid exhibits dual effects on viral infection: L-lactic acid exhibits antiviral effects at physiological and moderately elevated levels but proviral effects at high levels. Furthermore, we found that the viruses can achieve immune evasion by promoting SIRT1-mediated delactylation of IRF9. Interestingly, we uncovered that metformin promotes IRF9 L-lactylation by both accumulating lactic acid and disrupting virus-induced IRF9–SIRT1 interaction. These findings renew the understanding of the roles of lactic acid in antiviral immune response and determine metformin’s immunomodulatory effects on antiviral immunity through regulating IRF9 L-lactylation.