The development of the industrial internet of things accelerates the explosion of data-driven models for intelligent fault diagnosis of rotating machinery. However, traditional data-driven models hardly cope with complex fault modes and analyze the relationship between faults and system response. To address this challenge, this study presents a novel framework termed digital twin-driven fault diagnosis for rotating machinery. It illustrates the integration of information from a physical entity and a digital twin model for condition monitoring, fault diagnosis, fault prediction, and maintenance decision. To verify the proposed framework, digital twin models are constructed for a computer numerical control (CNC) workshop and a rotor system, respectively. The geometric and physical characteristics of actual rotating machinery are recovered, and the synchronous movement of the digital twin model and the physical entity is realized. Accurately analyzing fault responses of rotating machinery is also demonstrated with the digital twin models.