Acute respiratory distress syndrome (ARDS) is a serious lung condition characterized by severe hypoxemia leading to limitations of oxygen needed for lung function. In this study, we investigated the effect of anandamide (AEA), an endogenous cannabinoid, on Staphylococcal enterotoxin B (SEB)-mediated ARDS in female mice. Single-cell RNA sequencing data showed that the lung epithelial cells from AEA-treated mice showed increased levels of antimicrobial peptides (AMPs) and tight junction proteins. MiSeq sequencing data on 16S RNA and LEfSe analysis demonstrated that SEB caused significant alterations in the microbiota, with increases in pathogenic bacteria in both the lungs and the gut, while treatment with AEA reversed this effect and induced beneficial bacteria. AEA treatment suppressed inflammation both in the lungs as well as gut-associated mesenteric lymph nodes (MLNs). AEA triggered several bacterial species that produced increased levels of short-chain fatty acids (SCFAs), including butyrate. Furthermore, administration of butyrate alone could attenuate SEB-mediated ARDS. Taken together, our data indicate that AEA treatment attenuates SEB-mediated ARDS by suppressing inflammation and preventing dysbiosis, both in the lungs and the gut, through the induction of AMPs, tight junction proteins, and SCFAs that stabilize the gut-lung microbial axis driving immune homeostasis.