This study indicates that consuming a mixture of soybean oil and lard in a 1:1 ratio during the pre-pregnancy to postpartum period has a protective effect against postpartum cognitive impairment in maternal mice compared with lard alone, which is probably due to the alternation of brain fatty acid composition, mitigation of neuroinflammation, restoration of the gut microbiota, and upregulated expression of the SCFA/ERK(1/2)/CREB/BDNF pathway. The gene discussed is BDNF; the disease is Cognitive impairment.