High-resolution range profile (HRRP) is one of the most important approaches for radar automatic target recognition (RATR), which can project the target echoes from the scattering center of a ship target onto the radar line of sight (RLOS). This paper proposes an approach to use convolutional neural networks (CNNs) to recognize HRRP ship targets and a two-dimensional HRRP data format as the input of the CNN network. Compared with traditional pattern recognition approaches of handcrafted features based on researchers' prior knowledge and experience, the target recognition approach with deep neural network helps to avoid excessive use of artificially designed rules to extract features, and deep learning can automatically get the deep description features of the target. The approach presented in this paper has three main advantages: (1) Experiments conducted on the ship's HRRP dataset collected from the actual coastline are more realistic than most other papers using simulated datasets; (2) Proposed two-dimensional binary-map HRRP data format has good recognition performance, so it can be known that proper data preprocessing can improve recognition accuracy; (3) It can be seen from the experimental results that the CNN-based method proves that CNN can automatically learn the discriminative deep features of HRRP. It is feasible to use CNN to radar automatic target recognition based on real-life radar HRRP of ship targets.