Lavender essential oil (LO) is a traditional medicine used for the treatment of Alzheimer's disease (AD). It was extracted from Lavandula angustifolia Mill. This study was designed to investigate the effects of lavender essential oil (LO) and its active component, linalool (LI), against cognitive impairment induced by D-galactose (D-gal) and AlCl3 in mice and to explore the related mechanisms. Our results revealed that LO (100 mg/kg) or LI (100 mg/kg) significantly protected the cognitive impairments as assessed by the Morris water maze test and step-though test. The mechanisms study demonstrated that LO and LI significantly protected the decreased activity of superoxide dismutase (SOD), glutathione peroxidase (GPX), and protected the increased activity of acetylcholinesterase (AChE) and content of malondialdehyde (MDA). Besides, they protected the suppressed nuclear factor-erythroid 2-related factor 2 (Nrf2) and heme oxygenase-1 (HO-1) expression significantly. Moreover, the decreased expression of synapse plasticity-related proteins, calcium-calmodulin-dependent protein kinase II (CaMKII), p-CaMKII, brain-derived neurotrophic factor (BDNF), and TrkB in the hippocampus were increased with drug treatment. In conclusion, LO and its active component LI have protected the oxidative stress, activity of cholinergic function and expression of proteins of Nrf2/HO-1 pathway, and synaptic plasticity. It suggest that LO, especially LI, could be a potential agent for improving cognitive impairment in AD.