We propose an experiment to search for QCD axion and axionlike-particle dark matter. Nuclei that are interacting with the background axion dark matter acquire time-varying CP-odd nuclear moments such as an electric dipole moment. In analogy with nuclear magnetic resonance, these moments cause precession of nuclear spins in a material sample in the presence of an electric field. Precision magnetometry can be used to search for such precession. An initial phase of this experiment could cover many orders of magnitude in axionlike-particle parameter space beyond the current astrophysical and laboratory limits. And with established techniques, the proposed experimental scheme has sensitivity to QCD axion masses m a ≲ 10 −9 eV, corresponding to theoretically well-motivated axion decay constants f a ≳ 10 16 GeV. With further improvements, this experiment could ultimately cover the entire range of masses m a ≲ μ eV, complementary to cavity searches.