Helicobacter pylori (H. pylori) infection is related with a high risk of Alzheimer's disease (AD), but the intrinsic link between H. pylori infection and AD development is still missing. In the present study, we explored the effect of H. pylori infection on cognitive function and beta-amyloid production in rats. We found that intraperitoneal injection of H. pylori filtrate induced spatial learning and memory deficit in rats with a simultaneous retarded dendritic spine maturation in hippocampus. Injection of H. pylori filtrate significantly increased Abeta42 both in the hippocampus and cortex, together with an increased level of presenilin-2 (PS-2), one key component of gamma-secretase involved in Abeta production. Incubation of H. pylori filtrate with N2a cells which over-express amyloid precursor protein (APP) also resulted in increased PS-2 expression and Abeta42 overproduction. Injection of Escherichia coli (E.coli) filtrate, another common intestinal bacterium, had no effect on cognitive function in rats and Abeta production in rats and cells. These data suggest a specific effect of H. pylori on cognition and Abeta production. We conclude that soluble surface fractions of H. pylori may promote Abeta42 formation by enhancing the activity of gamma-secretase, thus induce cognitive impairment through interrupting the synaptic function.