Researchers claim that caffeine acts as a mild antidepressant by helping to boost mood hormones and other chemical signals in the brain.
Using data from 208,424 people, they found those who drank two to three cups of coffee a day had a 45 percent lower risk of suicide than those who drank less than one.
For those consumed more than four cups a day had a 53 percent lower risk.
There were 277 deaths from suicide during the study period, which stretched from 1988 to 2008.
Around 70-80 percent of the participants were coffee drinkers, according the paper, which is published in the World Journal of Biological Psychiatry.
The researchers, who are based at the Harvard School of Public Health, said, however, if depressed adults were already drinking coffee, increasing their intake would probably have little impact.
"Overall, our results suggest that there is little further benefit for consumption above two to three cups/day or 400 mg of caffeine/day," wrote Professor Alberto Ascherio and his colleagues.
Previous research has shown that caffeine can increase the expression of neurotransmitters in the brain, such as serotonin, dopamine and noradrenaline, which affect emotions.
SEE ALSO: Is Coffee Bad For You?