Rotating detonation engines (RDEs) are characterized by a thermodynamic cycle with an efficiency gain up to 15% at medium pressure ratios with respect to systems based on the conventional Joule–Bryton cycle. Multiple turbine designs can be considered, and this article deals with the supersonic inlet configuration. After having reviewed the main design steps of an exemplary RDE supersonic turbine, the article focuses on the considerable effects that endwall losses have on the performance of supersonic-inlet turbines and on the reasons why endwall contouring is strongly recommended for an efficient design. Parametric analyses, carried out by a novel in-house mean-line code validated against computational fluid dynamics (CFD), reveal that endwall friction losses contribute significantly to the overall stage loss. Endwall boundary layers also reduce the effective area, which can be critical for the self-starting capability of the supersonic channel. Therefore, a variable blade height geometry is necessary to extend the design space and guarantee a higher efficiency with respect to a constant-span configuration. The in-house CFD-based evolutionary shape optimization code was adapted to search for the optimal endwall shape for these unconventional machines. The optimal shape reduces shock losses and deviation angles and provides a significant gain in efficiency and work extraction. Finally, a novel technique is proposed to design the three-dimensional shape of the rotor based on the method of characteristics and tailored on the flow delivered by the stator.