Our study uncovers a key role for the gut microbiota in the regulation of autism-like social behavior by vitamin B6, dopamine, and the E/I balance in EphB6-deficient mice, and these findings suggest new strategies for understanding and treating ASD. Here, EPHB6 is linked to autism.