The implication of different dietary n-3/n-6 polyunsaturated fatty acids (PUFAs) ratios has been investigated in some neurodevelopmental disorders (including autism and depression). However, the mechanisms underlying the effects of different PUFAs ratios on the autism are still poorly understood. In the present study, a valproic acid (VPA) rat model of autism was used to study the effects of diet with different n-3/n-6 PUFA ratios on the autism, and the underlying mechanisms explored. Our results showed that rats with prenatal administration of VPA took less response time to sniff three odorants in the olfactory habituation/dishabituation tests, had lower frequency of pinning and following patterns, and had decreased hippocampal 5-hydroxytryptamine (5-HT), increased serum 5-HT and downregulated expression of tight junction protein (occludin and claudin-1) in the colon. However, supplementation of n-3/n-6 PUFAs (1:5) in the VPA treated rats ameliorated the autistic behaviors, increased hippocampal 5-HT and tight junction expression in the colon, and decreased serum 5-HT. In conclusion, dietary supplementation of n-3/n-6 PUFAs (1:5) significantly improves VPA-induced autism-like behaviors in rats, which may be, at least partially, related to the increased hippocampal 5-HT. Furthermore, this diet can increase the expression of tight junction proteins to improve intestinal barrier impairment.