Anxiety disorder has a high prevalence, and the risk of anxiety increases with age. Prenatal inflammation during key developmental timepoints can result in long-term changes in anxiety phenotype, even over a lifetime and across generations. However, whether maternal inflammation exposure during late gestation has intergenerational transmission effects on age-related anxiety-like behaviors and the possible underlying mechanisms are largely unknown. Fatty acid binding protein 7 (FABP7) is critical in hippocampal neurogenesis and is closely related to neuropsychiatric diseases, including anxiety disorder. The current study investigated the effects of maternal (F0 generation) lipopolysaccharide administration (50 μg/kg, i.p.) during late gestation on anxiety-like behaviors and FABP7 expression in F1 and F2 offspring, as well as the potential sex-specificity of intergenerational effects. Anxiety-like behaviors were evaluated using open field (OF), elevated plus maze, and black–white alley (BWA) tests at 3 and 13 months of age. The protein and messenger RNA levels of FABP7 in the hippocampus were measured using Western blot and real-time quantitative polymerase chain reaction (PCR), respectively. Overall, gestational LPS exposure in the F0 generation increased anxiety levels and decreased FABP7 expression levels in the F1 generation, which carried over to the F2 generation, and the intergenerational effects were mainly transferred via the maternal lineage. Moreover, hippocampal FABP7 expression was significantly correlated with performance in the battery of anxiety tests. The present study suggested that prenatal inflammation could increase age-related anxiety-like behaviors both in F1 and F2 offspring, and these effects possibly link to the FABP7 expression.