Salvianolic acid B (Sal B) is the primary water-soluble bioactive constituent derived from the roots of Salvia miltiorrhiza Bunge. This research was designed to reveal the potential mechanism of Sal B anti-liver injury from the perspective of macrophages. In our lipopolysaccharide-induced M1 macrophage model, Sal B showed a clear dose-dependent gradient of inhibition of the macrophage trend of the M1 type. Moreover, Sal B downregulated the expression of lactate dehydrogenase A (LDHA), while the overexpression of LDHA impaired Sal B’s effect of inhibiting the trend of macrophage M1 polarization. Additionally, this study revealed that Sal B exhibited inhibitory effects on the lactylation process of histone H3 lysine 18 (H3K18la). In a ChIP-qPCR analysis, Sal B was observed to drive a reduction in H3K18la levels in the promoter region of the LDHA, NLRP3, and IL-1β genes. Furthermore, our in vivo experiments showed that Sal B has a good effect on alleviating CCl4-induced liver injury. An examination of liver tissues and the Kupffer cells isolated from those tissues proved that Sal B affects the M1 polarization of macrophages and the level of histone lactylation. Together, our data reveal that Sal B has a potential mechanism of inhibiting the histone lactylation of macrophages by downregulating the level of LDHA in the treatment of liver injury.