Salmonella typhimurium infection is associated with gastrointestinal disorder and cellular injury in the liver of both humans and animals. Cinnamaldehyde, the main component of essential oil from cinnamon, has been reported to have anti-inflammatory, anti-oxidative, and anti-apoptotic effects. However, it remains unknown whether cinnamaldehyde can alleviate Salmonella typhimurium infection-induced liver injury in mice. In the present study, we found that cinnamaldehyde attenuated Salmonella typhimurium-induced body weight loss, the increase of organ (liver and spleen) indexes, hepatocyte apoptosis, and the mortality rate in mice. Further study showed that cinnamaldehyde significantly alleviated Salmonella typhimurium-induced liver injury as shown by activities of alanine transaminase, aspartate transaminase, and myeloperoxidase, as well as malondialdehyde. The increased mRNA level of pro-inflammatory cytokines (IL-1β, IL-6, TNF-α, and IFN-γ) and chemokines (CCL2 and CCL3) induced by Salmonella typhimurium were significantly abolished by cinnamaldehyde supplementation. These alterations were associated with a regulatory effect of cinnamaldehyde on TLR2, TLR4, and MyD88. 16S rDNA sequence analysis showed that Salmonella typhimurium infection led to upregulation of the abundances of genera Akkermansia, Bacteroides, Alistipes, Muribaculum, and Prevotellaceae UCG-001, and downregulation of the abundances of genera Lactobacillus, Enterorhabdus, and Eggerthellaceae (unclassified). These alterations were reversed by cinnamaldehyde supplementation. In conclusion, cinnamaldehyde attenuated the inflammatory response, oxidative stress, and apoptosis in the liver of Salmonella typhimurium-infected mice. Supplementation of cinnamaldehyde might be a preventive strategy to alleviate liver injury caused by Salmonella typhimurium infection in humans and animals.