In our study, the increase in ALT in the T2DM group was accompanied by significantly increased hepatic mRNA expression levels of Cyp7a1 and Cyp7b1 (p < 0.05), and the expression level of Cyp7b1 was greater than that of Cyp7a1, confirming that bile acid metabolism is enhanced in diabetic rats. Here, CYP7A1 is linked to type 2 diabetes mellitus.