During the past years, intelligent manufacturing has attracted enormous attention from both academia and industry. Smart factories/workshops/production lines are important carriers for realizing intelligent manufacturing. However, there are difficulties in smart factories in processing multi-source heterogeneous data, in integrating virtual and physical worlds, and in achieving continuous and iterative optimization with real-time feedback. Digital twin, which is able to deeply integrate physical and virtual worlds, provides an important technology for easing the difficulties mentioned above. The construction of a digital twin system can solve the problem of data fusion, analysis, processing, and applications in smart factory. Digital production lines are the foothold of a smart factory. Building a digital twin production line can facilitate rapid practice of digital twins and promote the development of intelligent manufacturing. To this end, this paper proposes a development framework for a digital twin production line with closed-loop control based on a mechatronics approach. The detailed development process is given based on the framework. The framework proposed may provide some inspiration and insights for design and development of digital twin production lines.