(1) Background: Interleukin 17 (IL17) and toll-like receptor 4 (TLR4) elevate the risk of metabolic and liver diseases. (2) Methods: This study's objective was to explore the association of IL17 and TLR4 gene polymorphisms with MASLD susceptibility and test their effect on serum IL17 and TLR4 levels. A total of 43 patients with MASLD (MASH/MAFL) and 38 healthy individuals were genotyped for IL17F-A7488G, IL17A-G197A, TLR4-Asp299Gly, and TLR4-Thr399Ile polymorphisms using PCR-RFLP. ELISA methods determined IL17F, IL17A, and TLR4 serum levels. (3) Conclusions: Patients carrying the variant genotypes (A/G + G/G) of IL17-A7448G (OR = 5.25), (G/A + A/A) of IL17-G197A (OR = 10.57), (Asp/Gly + Gly/Gly) of TLR4-Asp299Gly (OR = 3.52), or (Thr/Ile + Ile/Ile) of TLR4-Thr399Ile (OR = 9.87) had significantly increased odds of MASH. Genotype (G/A + A/A) of IL17-G197A was significantly associated with the odds of MAFL (p = 0.0166). Allele A of the IL17-G197A polymorphism was significantly related to increased odds of MAFL (OR = 4.13, p = 0.0133). In contrast, allele A of IL17-G197A (OR = 5.41, p = 0.008), allele Gly of TLR4-Asp299Gly (OR = 3.19, p = 0.046), and allele Ile of TLR4-Thr399Ile (OR = 6.94, p = 0.008) polymorphisms were significantly related to an increased risk of MASH. Allele A of IL17A-G197A, allele Gly of TLR4-Asp299Gly, and allele Ile of TLR4-Thr399Ile gene polymorphisms were significantly associated with the increased odds of MASLD. In patients with MASLD, we found significant influence from the IL17A-G197A gene polymorphism on IL17F levels (p = 0.0343).