Although the findings, published in Clinical Gastroenterology and Hepatology, are promising, the researchers do not recommend that people start drinking coffee solely to protect their liver.
The study shows only an association and cannot establish that coffee is the cause.
The researchers also point out that drinking too much coffee can lead to problems such as poor sleep and heart palpitations.
For that reason, coffee should still be consumed in moderation, according to Health.
Also read: Doctors warn: Don't ignore these signs of colon cancer
Not just caffeine
The study found that both regular coffee and decaffeinated coffee were associated with the same results.
This suggests that caffeine may not be be the only factor involved.
According to the researchers, other naturally occurring compounds in coffee may help reduce inflammation in the body and protect the liver.
This assessment is based in part on analyses of MRI scans and blood samples from a subset of the participants.
Also read: She took cold showers every morning for a week – here's how it affected her
How much coffee should you drink?
The researchers followed nearly 355,000 adults from the UK Biobank for around 13 years.
Participants reported how much coffee they drank, and the researchers later examined who went on to develop liver disease.
People who drank five or more cups of coffee a day had a lower risk of cirrhosis, liver cancer, and liver disease-related death than those who did not drink coffee.
People who drank three to four cups or one to two cups per day also had a lower risk.
Also read: Skin problems may be affecting more than your appearance
Also read: Goodbye to cavities? New gel shows promising results
