Maternal obesity induces hippocampal functional changes and leads to deficits in cognitive functions, such as learning and memory in offspring. We investigated the protective effects of physical exercise against cognitive function deficit in offspring born to obese mothers. Neurotrophic factors, neurogenesis, and apoptosis were analyzed in the hippocampus and dentate gyrus of offspring. Four-week-old female rats were fed a high-fat diet (HFD) for 20 weeks: 12 weeks prior to mating, and 8 weeks during pregnancy and breast-feeding. Male offspring rats were randomly divided into four groups: Control group (CON), exercise and control group (ECON), male offspring born to obese mother group (MOM), and exercise and MOM group (EMOM). In the exercise groups, treadmill exercise was performed 6 times per week for 4 weeks. Male offspring rats were subjected to the Morris water maze tests and step-down avoidance to assess spatial learning and memory, and short-term memory. The result showed that deficits in spatial learning and memory, and short-term memory in male offspring born to obese mothers was associated with decreases in brain-derived neurotrophic factor (BDNF) levels and neurogenesis, and an increase in apoptosis in the hippocampal dentate gyrus. Physical exercise improved spatial learning and memory, and short-term memory by enhancing BDNF levels and neurogenesis, and by inhibiting apoptosis in the hippocampal dentate gyrus of male offspring born to obese mothers. Our results suggest that physical exercise may be a preventive measure against or a treatment for cognitive function impairment.