Solid-state nuclear magnetic resonance (NMR) spectroscopy has been employed to characterize a variety of phenomena that are central to the functioning of lithium and lithium-ion batteries. These include Li insertion and de-insertion mechanisms in carbonaceous and other anode materials and in transition-metal oxide cathodes, and ion-transport mechanisms in polymer and gel electrolytes. Investigations carried out over the last several years by the authors and other groups are reviewed in this article. Results for lithium manganese oxide spinel cathodes, carbon-based and SnO anodes, and polymer and gel electrolytes are discussed.