Inland shipping is of great significance in economic development, and ship surveillance and classification are of great importance for ship management and dispatch. For river ship detection, ultrahigh-frequency (UHF) radar is an effective equipment owing to its wide coverage and easy deployment. The extension in range, Doppler, and azimuth and target recognition are two main problems in UHF ship detection. Clustering is a necessary step to get the center of an extended target. However, it is difficult to distinguish between different target echoes when they overlap each other in range, Doppler, and azimuth and so far practical methods for extended target recognition with UHF radar have been rarely discussed. In this study, a two-stage target classification method is proposed for UHF radar ship detection. In the first stage, grid-based gradient descent (GBGD) clustering is proposed to distinguish targets with three-dimensional (3D) information. Then in the second stage, the inverse synthetic aperture radar (ISAR) imaging algorithm is employed to differentiate ships of different types. The simulation results show that the proposed method achieves a 20% higher clustering accuracy than other methods when the targets have close 3D information. The feasibility of ISAR imaging for target classification using UHF radar is also validated via simulation. Some experimental results are also given to show the effectiveness of the proposed method.