To examine how sodium valproate and carbamazepine improve cognitive function and self-care in Epilepsy Patients (EP). Our facility collected 150 EP patients from September 2020 until June 2022. 70 patients received carbamazepine as the control group, and 80 received it with sodium valproate as the observation group. Both groups recorded EP attack frequency and duration following treatment to compare clinical efficacy. The Nerve Growth Factor (NGF) and Brain-Derived Neurotrophic Factor (BDNF) were measured before and after treatment, adverse effects were counted, and the patient's ability to perform activities of daily living and activities was assessed by Montreal Cognitive Assessment (MOCA), Activities of Daily Life (ADL), and Barthel Index (BI). The observation group had fewer EP episodes and shorter EP episodes than the control group (P<0.05), and the total effective rate of treatment was greater. After treatment, Nerve Growth Factor and Brain Derived Neurotrophic Factor were higher in the observation group than in the control group (P<0.05). The observation group had fewer adverse effects than the control group (P<0.05). The observation group outperformed the control group in MOCA, ADL, and BI after treatment (P<0.05). Valproate with carbamazepine can reduce EP attacks and improve clinical efficacy and safety.