Rotating machinery (e.g., rolling bearing and gearbox) are usually operated in high-risk and vulnerable environments such as time-varying loads and poor lubrication. Timely assessment of the operational status for rotating machinery is crucial to prevent damage caused by potential failure and shutdown, which significantly enhances the reliability of mechanical systems, prolongs the service life of critical components in rotating machinery, and minimizes unnecessary maintenance costs. To this regard, in this paper, a novel approach named self-attention mechanism combined time convolutional network with soft thresholding algorithm (SAM-TCN-ST) is proposed for fault intelligent recognition of rotating machinery. Specifically, the vibration signals are transformed into time-frequency graphs with distinct features utilizing the continuous wavelet transform (CWT), and then the proposed SAM-TCN-ST algorithm is employed for capturing essential data characteristics and classification performance. Eventually, the datasets from rolling bearings and gearbox are used for verifying the accuracy and effectiveness of the proposed method compared with state-of-the-art benchmark networks such as pure TCN, convolutional neural network (CNN) and long short-term memory (LSTM) models. Experimental results demonstrate that the recognition accuracy rate of the proposed SAM-TCN-ST is higher than that obtained from the benchmark methods. This research presents an intelligent and viable solution for achieving real-time monitoring of the status and detecting faults in rotating machinery, thereby expectedly enhancing the reliability of mechanical systems. Consequently, the proposed SAM-TCN-ST algorithm holds significant potential for application in prognostic and health management (PHM) practices related to rotating machinery.