The study of nearly 10,000 people showed that those who drank more than two cups of coffee or tea a day developed chronic liver disease at half the rate of those who drank less than one.
The study, conducted by the National Institute of Diabetes and Digestive and Kidney Diseases and Social & Scientific Systems, found that coffee provided no protection to people at risk of liver disease from other causes, such as viral infections.
Constance Ruhl, who helped lead the study, said on Sunday: "While it is too soon to encourage patients to increase their coffee and tea intake, the findings of our study potentially offer people at high-risk for developing chronic liver disease a practical way to decrease that risk.
"In addition, we hope the findings will offer guidance to researchers who are studying liver disease progression."
Writing in the American Gastroenterological Association journal Gastroenterology, Dr Ruhl and colleagues said caffeine seemed to hold the key.
They analysed the records of 9849 participants in a government survey whose coffee and tea intake was evaluated over a 19-year period.