Synchronized activity is common during various physiological operations but can culminate in seizures and consequently in epilepsy in pathological hyperexcitable conditions in the brain. Many types of seizures are not possible to control and impose significant disability for patients with epilepsy. Such intractable epilepsy cases are often associated with degeneration of inhibitory interneurons in the cortical areas resulting in impaired inhibitory drive onto the principal neurons. Recently emerging optogenetic technique has been proposed as an alternative approach to control such seizures but whether it may be effective in situations where inhibitory processes in the brain are compromised has not been addressed. Here we used pharmacological and optogenetic techniques to block inhibitory neurotransmission and induce epileptiform activity in vitro and in vivo. We demonstrate that NpHR-based optogenetic hyperpolarization and thereby inactivation of a principal neuronal population in the hippocampus is effectively attenuating seizure activity caused by disconnected network inhibition both in vitro and in vivo. Our data suggest that epileptiform activity in the hippocampus caused by impaired inhibition may be controlled by optogenetic silencing of principal neurons and potentially can be developed as an alternative treatment for epilepsy.