  We investigate the pair production of right-handed neutrinos mediated by a
$Z^\prime$ mainly from the meson decays at the FASER detector of the HL-LHC.
The $Z^\prime$ can be the additional gauge boson in either the $U(1)_{B-L}$ or
sterile $\nu$-specific $U(1)_s$ model. Taking the gauge coupling or the kinetic
mixing at the current limits, we analyse the sensitivity to the masses of the
heavy neutrinos, $M_N$, and active-sterile mixing, $|V_{lN}|^2$, of the FASER2.
In a background free scenario, for the $U(1)_{B-L}$ case, FASER2 is able to
probe $|V_{lN}|^2 \approx 10^{-8}$ when $M_N \sim 0.3$ GeV, which is comparable
to the current limits from the beam dump experiments. When comes to the
$U(1)_s$ model, FASER2 can probe $|V_{lN}|^2 \approx 10^{-10}$, which is better
than the current limits for at least one magnitude, in all three flavours. A
proposed long-lived particle detector, FACET, is also studied, while no
significant difference from FASER2 is derived.
