Ultralight axion-like particles are well-motivated dark matter candidates introduced by theories beyond the standard model of particle physics. However, directly constraining their parameter space with laboratory experiments usually yields weaker limits than indirect approaches relying on astrophysical observations. Here we report the search for axion-like particles with a quantum sensor in the mass range of 8.3–744.0 feV. The sensor makes use of hyperpolarized long-lived nuclear spins as a pre-amplifier that effectively enhances a coherently oscillating axion-like dark matter field by a factor of more than 100. Using these spin-based amplifiers, we achieve an ultrahigh magnetic sensitivity of 18 fT Hz–(1/2), which exceeds the performance of state-of-the-art nuclear spin magnetometers. Our experiment constrains the parameter space describing the coupling of axion-like particles to nucleons over the aforementioned mass range, namely, at 67.5 feV reaching 2.9 × 10−9 GeV−1, improving on previous laboratory constraints by at least five orders of magnitude. Our measurements also constrain the quadratic interaction between axion-like particles and nucleons as well as interactions between dark photons and nucleons, exceeding bounds from astrophysical observations.