The most frequent adverse events (AEs) of methotrexate (MTX) are gastrointestinal symptoms and hepatotoxicity, which can affect its adherence, leading to reduced effectiveness. The SLCO1B1 gene codes for a liver protein (OATP1B1) responsible for drug transportation. Genetic variations within the SLCO1B1 gene locus impact drug transport, leading to altered pharmacokinetic profiles, delayed MTX clearance, and increased risk of toxicity. This study aimed to determine the association between single nucleotide polymorphisms (SNPs) in the SLCO1B1 gene (rs4149056, rs2306283) with the development of AEs in patients with juvenile idiopathic arthritis (JIA) treated with MTX. We performed an observational retrospective study to analyze the relationship between SNPs in the SLCO1B1 gene and the development of AEs in pediatric patients treated with MTX for JIA. Thirty patients with JIA were included, 22 females (73.3%), with a median age of 11years (IQR 8.3-15). The most frequent JIA subtype was rheumatoid factor-positive polyarthritis (36.7%). Twenty patients (66.7%) reported AEs. The *1B haplotype was the most frequent in this group (53.3%) and conferred a higher risk of developing AEs (OR = 3.89, 95% CI = 1.23 -12.29, p = 0.03). Patients with the allele *1B may benefit from lower doses of MTX. SLCO1B1 genotyping is a promising technique to identify patients at higher risk of AEs during treatment with MTX, thus requiring dose optimization.