(1) Background: interleukin 23 (IL-23) and interleukin 27 (IL-27) modulate the activity of T helper 17 cells (Th17) with critical roles in autoimmune diseases and multiple sclerosis (MS). The genes responsible for cytokine generation are highly influenced by the presence of single nucleotide polymorphisms (SNP) in main regions such as regulatory sequences or in promoter regions, contributing to disease susceptibility and evolution. The present study analyzed the associations of IL-23 and IL-27 SNPs with susceptibility to multiple sclerosis. (2) Methods: We performed a case-control study including 252 subjects: 157 patients diagnosed with MS and 95 controls. We used polymerase chain reaction-restriction fragment length polymorphism (PCR-RFLP) to determine the genotypes for IL-27 T4730С (rs 181206), IL-27 A964G (rs 153109), and IL-23 receptor gene (IL-23R) G1142A (rs 11209026). (3) Results: The IL27-T4730С gene polymorphism was significantly associated with an increased odds of MS under the dominant genetic model (TC + CC variant genotypes, adjusted odds ratio OR = 4.06, 95% CI: 2.14–7.83, p-value = 0.000007, Q-value = 0.000063). Individuals carrying the IL-27 A924G variant (AG + GG) genotype presented higher odds of MS compared to non-carriers under the dominant model (adjusted OR = 1.93, 95% CI: 1.05–3.51, p-value = 0.0324, Q-value = 0.05832) and the allelic genetic model (unadjusted p-value = 0.015, OR = 1.58, 95% CI: 1.09–2.28), while IL-23-R381Q SNP conferred a decreased odds of MS under a codominant model of inheritance (adjusted OR = 0.26, 95% CI: 0.08–0.92, p-value = 0.0276, Q-value = 0.058) and an allelic model (unadjusted p-value = 0.008, OR = 0.23, 95% CI: 0.07–0.75). In an additive model with adjustment for age group (≤40 years vs. >40 years), sex and smoking, patients carrying the G-C (A964G, T4730C) haplotype had a 3.18 increased risk (95% CI: 1.74–5.81, p < 0.001) to develop multiple sclerosis. (4) Conclusions: The results of the current study showed a significant relationship of IL-27-A964G and IL-27-T4730C polymorphisms with increased risk of MS, and also the protective role of the IL-23-R381Q polymorphism. Moreover, the haplotype-based analysis proposed the mutant G-C (A924G, T4730C) as a significant risk haplotype for the development of MS.