Epilepsy, as a kind of neurological disease, is harmful to human mental health. There are many problems in the corresponding drugs and treatment methods, such as poor targeting, side effects and drug resistance. The conventional treatment of epilepsy is mainly focused on its corresponding electrophysiological mechanism to limit the discharge of epileptic focus. However, in the clinical and experimental observation process, this method finds that its corresponding target and direction are easily interfered, and its targeting shows poor directionality. Therefore, based on this, this paper will fully combine the electrophysiological mechanism of epilepsy and brain targeting technology, fully analyze the correlation between miR-181 and epilepsy and other nervous system diseases, and construct the epilepsy cell model to provide new ideas for the target and direction. Finally, we will construct a nanoscale hydrogel targeting the electric field, which can rapidly suppress the discharge and release the therapeutic drugs in epileptic seizures, so as to achieve effective treatment for epilepsy. The experimental results show that the new targeting technology proposed in this paper has obvious effect on the treatment of epilepsy.