This paper presents an open-source multibody modeling framework for wind turbine structural dynamics, namely TorqTwin (Torque Towards wind). The multibody formulation includes both rigid and flexible bodies. For flexible bodies, such as towers and blades, the floating frame of reference formulation and modal reduction approaches are applied. The TorqTwin tool relies on Kane’s method and the symbolic Python library SymPy. The multibody formulation in TorqTwin is validated using the OpenFAST-ElastoDyn module and the commercial software Bladed. For both the fixed-bottom and floating IEA 15MW reference wind turbines, the rigid motions and flexible deflections calculated by TorqTwin are compared to those by ElastoDyn. Also, blade deflections predicted by TorqTwin are compared to those of the commercial software Bladed. The overall very good agreement between TorqTwin and other software validates the multibody formulation in TorqTwin. The strength of TorqTwin is that it contains the full functionality of the state-of-the-art open-source ElastoDyn module and includes other modeling capabilities of commercial software, such as the bend-twist coupling effect of blades and more flexible modes. TorqTwin is designed to benefit both the wind energy research community and industry, as it helps understand and verify the theory behind the ElastoDyn module, provides a reference for formulating more complicated configurations, such as multi-rotor turbines, and helps to develop aeroelastic simulation tools.