Choosing different driving modes according to different road terrains can effectively improve the driving safety, pass-ability and comfort. However, there still remains some challenge on accurate and robust road terrain recognition using deep learning in complex environment. In this paper, we proposed an end-to-end tire noise recognition residual network (TNResNet) together with a time-frequency attention module, which can be used to capture time-frequency information of tire noise signal for road terrains recognition. Five different roads including asphalt road, cement road, grass road, mud road and sand road were tested by our method, whose performance was compared with other machine learning and deep learning methods such as Decision Tree, K-Nearest Neighbors, Support Vector Machine, Long Short-Term Memory, Convolutional Neural Network, and Artificial Intelligence Model. Experimental results show that our proposed TNResNet has the best performance among the mentioned methods, and its validation classification accuracy reaches 99.48%. This method shows remarkable application value in automatic road terrain identification of autonomous vehicles.