We analyzed the putative functional promoter polymorphism of the serotonin transporter (5-HTTLPR) in two large autism spectrum disorder samples and a control sample. A Hardy–Weinberg disequilibrium was detected for 5-HTTLPR in the unaffected founders of both autism spectrum disorder samples and control samples. When we lowered the total magnesium concentration in the polymerase chain reaction below levels reported in previously published studies, we observed a shift in relative allele frequencies and restoration of the Hardy–Weinberg equilibrium. Our data suggest that higher magnesium concentrations caused allele-dependent, non-random genotyping errors. Genotyping data obtained from the 2 mM magnesium protocol increased the significance of linkage and gave suggestive (P=0.06) association with autism spectrum disorder, whereas the corrected genotypes of 5-HTTLPR provide no linkage information beyond the results we have previously published and no evidence of association with autism spectrum disorder. We present details regarding appropriate polymerase chain reaction conditions for the accurate genotyping of this polymorphism.