This work proposes an optimal control approach for the termination of re-entry waves in cardiac electrophysiology. The control enters as an extracellular current density into the bidomain equations which are well established model equations in the literature to describe the electrical behavior of the cardiac tissue. The optimal control formulation is inspired, in part, by the dynamical systems behavior of the underlying system of differential equations. Existence of optimal controls is established and the optimality system is derived formally. The numerical realization is described in detail and numerical experiments, which demonstrate the capability of influencing and terminating reentry phenomena, are presented.