Maternal prenatal psychological distress, which includes depression and anxiety, affects the onset of autism spectrum disorder (ASD). However, there is no consistent knowledge regarding at which term during pregnancy psychological distress affects the risk of ASD among children. We used a dataset obtained from the Japan Environment and Children’s Study, which is a nationwide prospective birth cohort study, to evaluate the association between the six-item Kessler Psychological Distress Scale (K6) and ASD among 3-year-old children. A total of 78,745 children were analyzed, and 355 of them were diagnosed with ASD (0.45%). The maternal K6 was administered twice during pregnancy: at a median of 15.1 weeks (M-T1) and at that of 27.4 weeks (M-T2) of gestation. Multivariate logistic regression analyses demonstrated that the group with a maternal K6 score of ≥5 at both M-T1 and M-T2 was significantly associated with ASD among the children (adjusted odds ratio, 1.440; 95% confidence interval, 1.104–1.877) compared to the group with a score of ≤4 at both M-T1 and M-T2. There was no significant difference between the group with a score of ≥5 only at M-T1 or M-T2 and that with a score of ≤4 at both M-T1 and M-T2. In conclusion, from the first to the second half of pregnancy, continuous maternal psychological distress was associated with ASD among 3-year-old children. Contrarily, in the group without persistent maternal psychological distress during pregnancy, there was no significant association.