Six common candidate immune-related genes (PTGS2, FCGR1A, MMP9, VNN3, S100A12, and RRS1) of NAFLD and IS were identified, and a nomogram for diagnosing NAFLD with IS was established. The gene discussed is MMP9; the disease is metabolic dysfunction-associated steatotic liver disease.