Temporal lobe epilepsy with distributed hippocampal seizure foci is often intractable and secondary generalization of its seizures might lead to sudden death. Early termination of the seizures through spatially extensive hippocampal intervention is not feasible directly, due to its large size and irregular shape. In contrast, the medial septum (MS) is a promising target to govern hippocampal oscillations through its divergent connections to both hippocampi. Combining this ‘proxy intervention' concept and precisely-timed stimulation, we report here that closed-loop MS electrical stimulation can quickly terminate intrahippocampal seizures and suppress their secondary generalization in a rat kindling model. Precise stimulus timing governed by internal seizure rhythms in a closed-loop manner was essential for the seizure terminating effect. Cell-type-specific optogenetic stimulation revealed that alternating activation of MS GABAergic and glutamatergic neurons within the internal seizure rhythms can underlie the seizure terminating effect. This seizure rhythm congruent MS electrical stimulation can be directly translated into clinical application.