The impact of general anesthetics on neurodevelopment is highly controversial in terms of clinical and preclinical studies. Evidence mounted in recent years indicated development of social cognitions was more susceptible to general anesthesia in early life. However, the behavioral characterization during adolescence and underlying mechanisms remains unclear. Herein, we observed that early postnatal S-ketamine exposure specifically induced deficits in sociability and social cognition via a machine learning assistant behavioral analysis toolbox- Social Behavioral Atlas (SBeA). Furthermore, S-ketamine exposure constantly activates microglia in the prefrontal cortex (PFC), mediating excessive synaptic pruning and dendritic structural abnormalities, leading to overexcitation of excitatory synaptic transmission. Notably, S-ketamine exposure activated Stat1-Arg1 pathway in microglia. Downregulating Arg1 expression or prophylactic administrating Arg1 selective inhibitor nor-NOHA could reverse microglial overactivation and attenuate the neurodevelopmental disturbance induced by S-ketamine exposure. Our study identifies the abnormal behavioral phenotypes in adolescence induced by early postnatal S-ketamine exposure and reveals a potential target for preventing anesthesia-related neurodevelopmental abnormalities.