Objective To study the mechanism of herbal medicines with the actions of tonifying Qi,calming wind and eliminating phlegm in treating epilepsy. Methods Rat models of chronic epilepsy were induced by penicillin. Changes of electrocorticogram (ECOG) and the contents of cerebral gamma-aminobutyric acid (GABA) and glutamate (GLU) in rats were observed. Results Radix Astragali increased the content of GABA and the effect was stronger with Borneol Syntheticum added but had less effect in decreasing GLU. Both Bombyx Batryticatus and Arisaema cum Bile could decrease GLU content and Arisaema cum Bile in particular. The effect of Radix Astragali was stronger in decrease of ECOG frequency but weaker than that in modifying the amplitude of ECOG,while Bombyx Batryticatus and Arisaema cum Bile were in the contrary. The effect of Radix Astragali in improving ECOG did not differ from that with Borneolm Syntheticum added. Conclusion Qi-tonifying,wind-calming and phlegm-eliminating herbal medicines are effective in treating epilepsy and their mechanism may be related to the regulation of electrocorticogram and the content of cerebral GABA and GLU.