In spite of adequate seizure control, approximately 75% of pyridoxine-dependent epilepsy (PDE) patients with ALDH7A1 mutation still suffer from intellectual disability. However, the mechanisms underlying brain dysfunction in PDE patients are still unknown even when seizure control is achieved. In this study, we show that mice with specific deletion of Aldh7a1 from astrocytes, but not neurons, exhibit PDE, and have defective dendritic spine development and cognitive impairment when seizure occurrence is well controlled. Mechanistically, ALDH7A1 deficiency leads to dysregulation of astrocyte-derived matrix gla protein (MGP), one of the vitamin K-dependent proteins, thereby impairing dendritic spine development and synaptic transmission. Notably, supplementation of menaquinone-7, a form of vitamin K, promotes MGP activation and rescues defective dendritic spine development, abnormal synaptic transmission, and cognitive impairment in Aldh7a1-deficient mice. Therefore, our findings not only unravel the important role of ALDH7A1 in astrocytes contributing to the pathogenesis of PDE, but also provide a potential therapeutic intervention to ameliorate cognitive impairment in PDE beyond pyridoxine treatment.