Doping is a potent and often used strategy to modify properties of active electrode materials in advanced electrochemical batteries. There are several factors by which doping changes properties critically affecting battery performance, most notably the voltage, capacity, rate capability, and stability. These factors have to do specifically with changes in structure, band gap and band structure, and structural instability induced by doping. We review our recent modeling works on the effects of doping of active electrode materials, notably for prospective materials for organic and post-lithium (Na ion, Mg ion) batteries, as well as present new results, to build a coherent view on the use of n- and p-doping to modulate Li, Na, and Mg storage properties, most notably voltage. Specifically, we clearly point out effects due to electronic structure and those due to strain (structural instability), which clears some confusion about the effects of n- versus p-doping and facilitates rational rather than ad hoc design of doped materials.