Early diagnosis of prostate cancer (PCa) is always a great challenge in clinical practice, especially in distinguishing benign prostatic hyperplasia (BPH) from early cancer, due to the high similarity in pathology from the prostate‐specific antigen (PSA) test and radiological detection. The conventional diagnostic methods are often less efficient in specificity and accuracy, leading to quite a few unnecessary biopsies. This work establishes a noninvasive diagnostic method for PCa by investigating urine samples using Raman spectroscopy and convolutional neural network (CNN) algorithm. The results of urine Raman spectra show the intensities of characteristic peaks for lipids, nucleic acids, and some amino acids are distinguishable between PCa and BPH, suggesting an abnormal metabolism caused by PCa, which can be detected by Raman spectroscopy. These data are then used to train an intelligent diagnostic model with CNN algorithm. The cross‐validation results show the mean diagnostic accuracy, sensitivity, and specificity for PCa are 74.95%, 77.32%, and 72.46%, respectively. This noninvasive diagnostic method is a promising method for the early diagnosis of PCa, and the idea of using urine Raman spectroscopy with deep learning techniques for diagnosing PCa provides a reference for the application of artificial intelligence in the field of clinical medicine research.