Prenatal and postnatal treatment with resveratrol activated ERβ via histone and DNA demethylation on ERβ promoter as well as reduced oxidative stress, mitochondrial dysfunction, and lipid metabolism in the brain therefor, alleviated autism-like behavior. Here, ESR2 is linked to autism.