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.

They are among seven ex-News of the World staff accused of conspiracy to access voicemails. Prosecutors say the charge could involve about 600 victims.
Private investigator Glenn Mulcaire, facing four counts relating to specific people, was also at the Old Bailey.
A 9 September 2013 trial date was set.
The former staff members from the now-defunct News of the World newspaper who are also facing trial are its ex-managing editor Stuart Kuttner, former news editor Greg Miskiw, former head of news Ian Edmondson, ex-reporter James Weatherup and former chief reporter Neville Thurlbeck.
As well as a general conspiracy to unlawfully intercept communications charge, other charges relate to specific people.
Mr Coulson was News of the World editor from 2003 to 2007 and Mrs Brooks edited the paper from 2000 to 2003, before moving on to edit the Sun and then becoming chief executive officer of the two papers' parent group News International.
Mr Kuttner was excused from attending Wednesday's hearing.
The provisional trial date was set for 9 September next year and all defendants were released on bail.
In a separate case, Mrs Brooks, 44, from Churchill in Oxfordshire, her husband, Charlie, and five others  appeared before the court accused of conspiracy to pervert the course of justice.
Mrs Brooks's chauffeur Paul Edwards, former personal assistant Cheryl Carter, head of security at News International Mark Hanna, and security staff Daryl Jorsling and Lee Sandell also face the charges.
They relate to an alleged attempt to hide evidence from police investigating phone-hacking claims and illegal payments to public officials by the News of the World and the Sun.
Researchers have identified a gene that appears to curb coffee consumption.
[NEXT_CONCEPT]
Former News International boss Rebekah Brooks and ex-Downing Street communications chief Andy Coulson have learned their trial over phone-hacking claims will take place next September.