Cosmic rays have been observed as part of multi-messenger astronomy and have provided clues about astronomical objects. Ultra-high-energy cosmic rays (UHECRs) are the most energetic particles known in the Universe, yet their origins remain elusive. Radio galaxies, with their powerful relativistic jets, are widely considered promising UHECR sources. We present a study to investigate particle acceleration within the jets of Fanaroff–Riley (FR) type I and II radio galaxies using numerical simulations. We model the nonlinear dynamics of ultra-relativistic jets with a high-order relativistic hydrodynamics code, and subsequently track cosmic-ray transport and acceleration through a Monte Carlo framework. Our simulations show that the dominant acceleration mechanism is relativistic shear acceleration operating at the interface between the jet spine and the surrounding backflow (cocoon). Additional, though less efficient, contributions arise from shocks and turbulence within the backflow region. Based on these results, we derive model UHECR spectra for FR I and FR II jets, offering a framework for interpreting UHECR observations at Earth, particularly those associated with nearby radio galaxies.