  We present a new mechanism to produce the dark photon ($\gamma'$) in the
early universe with a help of the axion ($a$) using a recently proposed dark
axion portal. The dark photon, a light gauge boson in the dark sector, can be a
relic dark matter if its lifetime is long enough. The main process we consider
is a variant of the Primakoff process $f a \to f \gamma'$ mediated by a photon,
which is possible with the axion--photon--dark photon coupling. The axion is
thermalized in the early universe because of the strong interaction and it can
contribute to the non-thermal dark photon production through the dark axion
portal coupling. It provides a two-component dark matter sector, and the relic
density deficit issue of the axion dark matter can be addressed by the
compensation with the dark photon. The dark photon dark matter can also address
the reported 3.5 keV $X$-ray excess via the $\gamma' \to \gamma a$ decay.
