Leeds fielded a patched-up side, including17-year-old debutants Max Simpson and Jack Sinfield, but hit back from 8-0 down to go into the final quarter all square.
The sin-binning of Leeds second-rower James Bentley proved costly, but they were in the contest until the final seconds.
A major concern for Rhinos was a head injury suffered by stand-off Blake Austin, which leaves them without any experienced half-backs for Friday's crucial visit of Toulouse Olympique.
Here's how the Rhinos players rated, plus marks for the Castleford side and referee.
A major concern for Rhinos was a head injury suffered by stand-off Blake Austin, which leaves them without any experienced half-backs for Friday's crucial visit of Toulouse Olympique.