Despite the accumulating evidence regarding the oncological differences between nonalcoholic fatty liver disease (NAFLD)-related hepatocellular carcinoma (HCC) and viral infection-related HCC, the short- and long-term outcomes of surgical resection of NAFLD-related HCC remain unclear. While some reports indicate improved postoperative survival in NAFLD-related HCC, other studies suggest higher postoperative complications in these patients. Patients with NAFLD and those with hepatitis viral infection who underwent hepatectomy for HCC at our department were retrospectively analyzed. The clinical, surgical, pathological, and survival outcomes were compared between the two groups. Among the 1047 consecutive patients who underwent hepatectomy for HCC, 57 had NAFLD-related HCC (NAFLD group), and 727 had virus-related HCC (VH group). The body mass index and serum glycated hemoglobin levels were significantly higher in the NAFLD group than in the VH group. There were no significant differences in operative time and bleeding amount. Moreover, the morbidity and the length of postoperative hospital stays were similar across both groups. The pathological results showed that the tumor size was significantly larger in the NAFLD group than in the VH group. No significant differences between the groups in overall or recurrence-free survival were found. In a subgroup analysis with matched tumor diameters, patients in the NAFLD group had a better prognosis after hepatectomy than those in the VH group. Surgical outcomes after hepatectomy were comparable between the groups. Subgroup analysis reveals early detection and surgical intervention in NAFLD-HCC may improve prognosis.