Neurofibromatosis type 1 (NF1) is a dominant genetic disorder manifesting, in part, as cognitive defects. Previous study indicated that neurofibromin (NF1 protein) interacts with valosin-containing protein (VCP)/P97 to control dendritic spine formation, but the mechanism is unknown. Here, using Nf1+/–mice and transgenic mice overexpressing wild-type Vcp/p97, we demonstrate that neurofibromin acts with VCP to control endoplasmic reticulum (ER) formation and consequent protein synthesis and regulates dendritic spine formation, thereby modulating contextual fear memory and social interaction. To validate the role of protein synthesis, we perform leucine supplementation in vitro and in vivo. Our results suggest that leucine can effectively enter the brain and increase protein synthesis and dendritic spine density of Nf1+/– neurons. Contextual memory and social behavior of Nf1+/– mice are also restored by leucine supplementation. Our study suggests that the “ER-protein synthesis” pathway downstream of neurofibromin and VCP is a critical regulator of dendritic spinogenesis and brain function.