Objectives To compare the long-term outcomes of microwave ablation (MWA) for primary hepatocellular carcinoma (HCC) in patients with metabolic-associated fatty liver disease (MAFLD) with those infected by hepatitis virus B (HBV). Methods The clinical data of HCC patients under the treatment of MWA were analyzed retrospectively between 2010 and 2021 at Chinese PLA General Hospital. Patients were divided into MAFLD-HCC and HBV-HCC group according to the chronic liver disease etiology. The propensity score matching (PSM) was performed to reduce the interference of confounders. The primary outcomes were overall survival (OS), recurrence-free survival (RFS), cancer-specific survival (CSS) and intrahepatic distant recurrence (IDR). Results A total of 648 patients (age range, 18–91 years) with 1019 lesions were enrolled including 601 with HBV-HCC and 47 with MAFLD-HCC. After a variable ratio of 1:n ≤ 4 PSM, 100 patients were included in the HBV-HCC and 41 in the MAFLD-HCC group. No statistical differences in OS and CSS (p = 0.880 and p = 0.980, respectively) were observed between the two groups in the matched cohort, while MAFLD-HCC exhibited better RFS and lower IDR rates compared to HBV-HCC (p = 0.043 and p = 0.041, respectively). Additionally, MAFLD-HCC generated lower ascending range in the liver function indexes like ΔALT (46.7 vs. 98.5, p < 0.001), ΔTBIL (1.9 vs. 7.5, p = 0.001) and ΔAST (38.1 vs. 148.6, p < 0.001) than HBV-HCC after MWA. Conclusions MWA is an effective treatment for HCC patients with MAFLD. The recurrence prognosis of MAFLD-HCC was better than HBV-HCC and the degree of liver injury after MWA was lower.