  If the masses of at least two generations of right-handed neutrinos (RHNs)
are near-degenerate, the scale of leptogenesis can be as low as $\sim$ 100 GeV.
In this work, we study probing such resonant leptogenesis in the $B-L$ model at
the LHC and future multi-TeV muon colliders via the process $Z'\to
NN\to\ell^\pm\ell^\pm+{\rm jets}$, with $Z'$ the $U(1)_{B-L}$ gauge boson and
$N$ the RHN. The same-sign dilepton feature of the signal makes it almost
background-free, while the event number difference between positive and
negative leptons is a hint for $CP$ violation, which is a key ingredient of
leptogenesis. We found that resonant leptogenesis can be tested at the HL-LHC
for $M_{Z'}$ up to 12 TeV, while at a 10 (30) TeV muon collider the reach can
be up to $M_{Z'}\sim28~(100)$ TeV via the off-shell production of $Z'$.
