We present porous electrode theory for capacitive deionization (CDI) with electrodes containing nanoparticles that consist of a redox-active intercalation material. A geometry of a desalination cell is considered which consists of two porous electrodes, two flow channels and an anion-exchange membrane, and we use Nernst-Planck theory to describe ion transport in the aqueous phase in all these layers. A single-salt solution is considered, with unequal diffusion coefficients for anions and cations. Similar to previous models for CDI and electrodialysis, we solve the dynamic two-dimensional equations by assuming that flow of water, and thus the advection of ions, is zero in the electrode, and in the flow channel only occurs in the direction along the electrode and membrane. In all layers, diffusion and migration are only considered in the direction perpendicular to the flow of water. Electronic as well as ionic transport limitations within the nanoparticles are neglected, and instead the Frumkin isotherm (or regular solution model) is used to describe local chemical equilibrium of cations between the nanoparticles and the adjacent electrolyte, as a function of the electrode potential. Our model describes the dynamics of key parameters of the CDI process with intercalation electrodes, such as effluent salt concentration, the distribution of intercalated ions, cell voltage, and energy consumption.