People with a DNA variation in a gene called PDSS2 tend to drink fewer cups of coffee, a study carried out at the University of Edinburgh has found.
It suggests the gene reduces cell ability to break down caffeine.
This causes it to stay in the body for longer and means those with the gene get the same caffeine hit through less coffee.
One scientist working on the project said it suggests the "drive to drink coffee may be embedded in our genes".
The researchers studied the DNA of 370 people living in a small village in southern Italy and 843 people from six villages in north-east Italy.
The subjects were asked to complete a survey including a question about how many cups of coffee they drank each day.
The team found people with the PDSS2 DNA variation tended to consume fewer cups of coffee than people without the variation - equivalent to one fewer cup daily on average.
Researchers replicated the study in a group of 1,731 people from the Netherlands. The result was similar but the effect of the gene on the number of cups of coffee consumed was slightly lower.
The scientists said the change could be down to the different styles of coffee drunk in the two countries.
In Italy, people tend to drink smaller cups such as espresso whereas in the Netherlands the preference is towards larger cups which contain more caffeine overall.
Dr Nicola Pirastu, a Chancellor's Fellow at the University of Edinburgh, said: "The results of our study add to existing research suggesting that our drive to drink coffee may be embedded in our genes.
"We need to do larger studies to confirm the discovery and also to clarify the biological link between PDSS2 and coffee consumption."
The study is published in the journal Scientific Reports and was conducted at the universities of Edinburgh and Trieste, the Burlo Garofolo Pediatric Institute in Italy, the Erasmus Medical Centre and PolyOmica, a data analysis company based in Groningen, the Netherlands.
Researchers have identified a gene that appears to curb coffee consumption.