Purpose. To investigate the influence of alanine transaminase (ALT) on the accuracy of alpha-fetoprotein (AFP) for detecting hepatocellular carcinoma (HCC).Methods. This retrospective study recruited 799 patients with HCC, cirrhosis, and chronic hepatitis due to hepatitis B infection and healthy adults between July 2017 and January 2019. Comparisons of the area under the receiver operating characteristic curves (AUCs) for detecting HCC in different ALT levels were calculated. Results. Serum ALT and gamma-glutamyl transferase levels were significantly associated with elevated AFP in patients without HCC. The AUC of AFP was higher in patients with
ALT
≤
2
upper limit of normal (ULN) than in patients with
ALT
>
2
ULN (0.806 vs. 0.611,
P
<
0.001
). Nevertheless, there were no significant differences in the AUCs of
AFP
/
ALT
×
aspartate
aminotransferase
AST
in patients with
ALT
≤
2
ULN and with
ALT
>
2
ULN (0.745 vs. 0.769,
P
=
0.68
).
AFP
/
ALT
×
AST
was better than AFP in patients with
ALT
>
2
ULN for detecting HCC (
P
<
0.001
). Conclusions. Higher ALT levels might impair the accuracy of AFP for diagnosing HCC. AFP tests showed better accuracy in patients with
ALT
≤
2
ULN whereas the
AFP
/
ALT
×
AST
ratio was recommended in patients with elevated ALT levels.