Many patients can be relieved by medical treatment with medication, but some patients do need surgery, what kind of patients need surgery to treat epilepsy? The first choice for epilepsy patients is usually medication. However, considering the uncertainty of the effect of medication, the long-term nature and the accumulation of side effects over time. For the following cases, surgical treatment should be chosen: 1. For those who can find clear epileptic foci through various medical examinations (secondary epilepsy), surgical removal of epileptogenic foci is generally preferred. The common foci causing secondary epilepsy are mainly tumors of the brain, cavernous hemangiomas, vascular malformations, focal cortical dysplasia, cerebral gyrus brain cleft malformations, cerebral gray matter ectopia, softening foci after trauma, parasites sarcoidosis, Rasmussen’s encephalitis, etc. 2, For epileptic lesions located in important functional areas of the brain such as motor or language, lesion excision surgery will lead to severe dysfunction, multiple submural transverse fiber resection, low power thermal cautery of the epileptogenic area, corpus callosotomy, vagus nerve stimulation, deep brain electrical stimulation and other treatment methods can be selected according to the situation. 3. Primary epilepsy (those with no abnormalities on CT and MRI examinations) is not a contraindication to surgery. For patients with more than 2 years of regular medication and 2 or more oral antiepileptic drugs and still have more than 1 seizure per month, it is unlikely that the epilepsy will be controlled with further medication and surgical treatment should be actively performed. For those who can locate the epileptogenic focus through noninvasive and invasive assessment, epileptogenic focus resection can achieve good results; other patients can consider corpus callosotomy, vagus nerve stimulation, deep brain electrical stimulation and other surgical procedures as appropriate. 4. For children and infants with frequent seizures, surgery should also be considered as early as possible to stop the effects of seizures on brain development. Surgery is a very important treatment. For secondary epilepsy with a clear epileptogenic focus, surgery should be preferred if the lesion is not in an important functional area, which includes the more common temporal lobe epilepsy, and surgical treatment can achieve good satisfactory results in most of these patients. For drug-refractory primary epilepsy and secondary epilepsy with foci in important functional areas, the same good results can be achieved with advanced medical detection techniques and improved surgical techniques.