A mechanics-based model of flexible needle insertion into soft tissue is presented in this paper. Different from the existing kinematic model, a new model has been established based on the quasi-static principle, which also incorporates the dynamics of needle motions. In order to increase the accuracy of the model, nonlinear characteristics of the flexible needle and the soft tissue are both taken into account. The nonlinear Winkler foundation model and the modified Euler–Bernoulli theory are applied in this study, providing a theoretical framework to study insertion and deformation of needles. Galerkin method and iteration cycle analysis are applied in solving a series of deformation control equations to obtain the needle deflection. The parameters used in the mechanics-based model are obtained from the needle force and needle insertion experiment. Sensitivity studies show that the model can respond reasonably to changes in response to variations in different parameters. A 50 mm needle insertion simulation and a 50 mm corresponding needle insertion experiment are conducted to prove the validity of the model. At last, a study on different needle tip bevel demonstrates that the mechanics-based model can precisely predict the needle deflection when more than one parameter is changed. The solution can also be used in optimizing trajectory of the needle tip, enabling the needle to reach the target without touching important physiological structures such as blood vessels with the help of dynamic trajectory planning.