Reconfigurable intelligent surface (RIS) refers to a two‐dimensional smart surface consisting of massive number of reflecting elements. Both active RIS (ARIS) and passive RIS (PRIS) are promising technologies that can adapt and reconfigure the wireless environment, enhancing the reliability and capacity of wireless networks. The authors focus on enhancing the detection ability of ARIS/PRIS‐aided multiple‐input‐multiple‐output radar system in the presence of signal‐dependent clutter. Constant‐envelope constraint is imposed on the sought radar waveforms to improve the practicability of the radar system. To tackle the resultant non‐convex problem, a cyclic method based on minorisation–maximisation and alternating direction method of multipliers is derived to iteratively optimise the receive filters, the transmit waveforms, and the RIS coefficients. The major finding is that the distance between the radar and the ARIS has little to no impact on the radar signal‐to‐interference‐plus‐noise ratio (SINR). For the PRIS‐aided radar system, a simplified model can significantly improve the operational efficiency and has little impact on the radar SINR. Numerous results verify the effectiveness of the proposed algorithm.