Middle-aged women who had been on the drug when they were younger performed far better in memory tests than those who had never taken it.
Experts think that the key hormone in the pill, oestrogen, prevents the arteries from hardening, which increases the blood supply to the brain, helping stave off the disease, the 'Daily Mail' reported.
Scientists, for some years, have known that Hormone replacement therapy (HRT), which also contains oestrogen, seems to protect against dementia.
However, little was known about the potential benefits of the contraceptive pill.
US scientists looked at 261 women aged 40 to 65 who were surveyed on their health. They conducted a series of tests on their memory, including naming certain objects and listing as many words as they could on a given subject.
Researchers from the University of Wisconsin found that women who had taken the contraceptive pill performed significantly better in some of the tests.
They also found that the longer the women had been on the contraceptive pills, the higher their scores.
Although the study did not directly look at the risks of dementia, adults whose brains are sharper in middle age are thought to be far less at risk of the illness.
Experts think that oestrogen, the main hormone in the Pill, helps maintain the function of the brain in two ways.
Firstly, they believe it prevents the arteries from becoming blocked, which keeps a steady flow of blood to the brain. They also believe it may encourage the growth of certain cells in the brain and spinal cord.
"Our analysis indicated that hormonal contraceptive use may have a protective cognitive (memory) effect, even years after use is discontinued. This is especially true in subjects with a longer duration of use," lead researcher Kelly Egan, said.
The contraceptive pill may been shown to protect against some cancers such as ovarian and bowel, however, it is thought to raise the risk of breast tumours, report said.