Abstract-The optical theorem is a fundamental result that describes the energy budget of wave scattering phenomena. Most past formulations have been derived in the frequency domain and thus apply only to linear time-invariant (LTI) scatterers and background media. In this paper we develop a new theory of the electromagnetic form of the optical theorem directly in the time domain. The derived formulation covers not only the ordinary optical theorem but also the most general form of this result, known as the generalized optical theorem. The developed formulation provides a very general description of the optical theorem for arbitrary probing fields and general scatterers that can be electromagnetically nonlinear, time-varying, and lossy. In the derived formalism, both the scatterer and the background medium can be nonhomogeneous and anisotropic, but the background is assumed to be LTI and lossless. The derived results are illustrated with a computer simulation study of scattering in the presence of a corner reflector which acts as the background. Connections to prior work on the time-domain optical theorem under plane wave excitation in free space are also discussed.