The contact force of the clearance joints in the mechanical system is strongly nonlinear, which is influenced by the amount of clearance, the material property of the parts and the contact state during movement. In some fields which need to control the dynamic response of mechanical system accurately, it is very important to predict the contact process of clearance joints and the time-frequency characteristics of contact force. In this paper, a dynamic modelling method combining neural network model and co-simulation technology is proposed, which can effectively model and simulate the mechanical system with clearance. The contact friction data set is generated based on the friction experiment of sliding bearing, and the contact collision force data set is generated based on the theoretical model of impact force. The nonlinear contact force neural network model of clearance joints is constructed by deep learning method, and transplanted to Simulink. According to the 3D model of transmission test bench, the dynamic simulation model of mechanical system is established by using ADAMS, and the fusion of neural network model and traditional dynamics model is finally realized based on Simulink/ADAMS co-simulation technology. The creativity of this method lies in the use of neural network model to describe the clearance joints and the use of ideal constraints to describe other kinematic pairs. The combination of force and constraint can not only improve the accuracy of solution, but also ensure the fast calculation speed, which provides a feasible idea for the application of deep learning method in the direction of nonlinear system dynamics modelling.