This can lead to scarring of the liver - also known as cirrhosis - and cancer.
In the study, Edinburgh researchers analysed the records of people aged 35 to 84 over a six-year period to 2007.
They compared 1,267 diabetes sufferers to 10,100 people without the condition, who all died of liver disease.
The results showed about one in four (24%) people with diabetes died of liver cancer, compared to one in ten (9%) of non-diabetics.
However, more people without diabetes died from alcoholic liver disease (63%) compared to those with diabetes (38%).
End Quote Dr Iain Frame Diabetes UKPrevious studies have found a link between diabetes and liver disease and this research adds to that knowledge”
"The major risk factor for it is being overweight, which is also an important risk factor for Type 2 diabetes.
"Non-alcoholic fatty liver disease increases the risk of cirrhosis which in turn increases the risk of liver cancer.
"A healthy lifestyle can reduce the risk and prevention is particularly important because the options for treatment are limited."
The research is being presented at the Diabetes UK Annual Professional Conference, which ends on Friday.
Diabetes UK director of research, Dr Iain Frame, said: "Previous studies have found a link between diabetes and liver disease and this research adds to that knowledge.
"We now need further investigation into how diabetes affects the liver to find new methods of preventing this complication."