  The lack of information before Big Bang Neucleosynthesis (BBN) allow us to
assume the presence of a new species $\phi$ whose energy density redshifts as
$a^{-(4+n)}$ where $n>0$ and $a$ is the scale factor. This non-standard
cosmological setup facilitates a larger portal coupling $(\epsilon)$ between
the dark and the visible sectors even when the two sectors are not in thermal
equilibrium. Here, we have considered $U(1)_{L_\mu-L_\tau}\otimes U(1)_X$ gauge
extension of the Standard Model (SM) and studied different phases of the
cosmological evolution of a thermally decoupled dark sector such as leak-in,
freeze-in, reannihilation, and late-time annihilation in the presence of fast
expansion. Due to the tree level kinetic mixing between $U(1)_X$ and
$U(1)_{L_\mu-L_\tau}$ gauge bosons, the dark sector couples with the $\mu$ and
$\tau$ flavored leptons of the SM. We show that in our scenario it is possible
to reconcile the dark matter relic density and muon $(g-2)$ anomaly. In
particular, we show that for $2\times 10^{-4} \lesssim \epsilon \lesssim
10^{-3}$, $5.5{\rm MeV} \lesssim m_{Z^\prime} \lesssim 200{\rm MeV}$, $n=4$,
and $1{\rm TeV} \lesssim m_\chi \lesssim 10{\rm TeV}$ relic density constraint
of dark matter, constraint from muon $(g-2)$ anomaly, and other cosmological,
astrophysical constraints are satisfied.
