  We study axion dark matter production from a misalignment mechanism in
scenarios featuring a general nonstandard cosmology. Before the onset of Big
Bang nucleosynthesis, the energy density of the universe is dominated by a
particle field $\phi$ described by a general equation of state $\omega$. The
ensuing enhancement of the Hubble expansion rate decreases the temperature at
which axions start to oscillate, opening this way the possibility for axions
heavier than in the standard window. This is the case for kination, or in
general for scenarios with $\omega > 1/3$. However, if $\omega < 1/3$, as in
the case of an early matter domination, the decay of $\phi$ injects additional
entropy relative to the case of the standard model, diluting this way the
preexisting axion abundance, and rendering lighter axions viable. For a
misalignment angle $0.5 < \theta_i < \pi/\sqrt{3}$, the usual axion window
becomes expanded to $4 \times 10^{-9}$ eV $\lesssim m_a \lesssim 2 \times
10^{-5}$ eV for the case of an early matter domination, or to $2 \times
10^{-6}$ eV $\lesssim m_a \lesssim 10^{-2}$ eV for the case of kination.
Interestingly, the coupling axion-photon in such a wider range can be probed
with next generation experiments such as ABRACADABRA, KLASH, ADMX, MADMAX, and
ORGAN. Axion dark matter searches may therefore provide a unique tool to probe
the history of the universe before Big Bang nucleosynthesis.
