Forward dynamic simulation provides a powerful framework for characterizing internal loads and for predicting changes in movement due to injury, impairment or surgical intervention. However, the computational challenge of generating simulations has greatly limited the use and application of forward dynamic models for simulating human gait. In this study, we introduce an optimal estimation approach to efficiently solve for generalized accelerations that satisfy the overall equations of motion and best agree with measured kinematics and ground reaction forces. The estimated accelerations are numerically integrated to enforce dynamic consistency over time, resulting in a forward dynamic simulation. Numerical optimization is then used to determine a set of initial generalized coordinates and speeds that produce a simulation that is most consistent with the measured motion over a full cycle of gait. The proposed method was evaluated with synthetically created kinematics and force plate data in which both random noise and bias errors were introduced. We also applied the method to experimental gait data collected from five young healthy adults walking at a preferred speed. We show that the proposed residual elimination algorithm (REA) converges to an accurate solution, reduces the detrimental effects of kinematic measurement errors on joint moments, and eliminates the need for residual forces that arise in standard inverse dynamics. The greatest improvements in joint kinetics were observed proximally, with the algorithm reducing joint moment errors due to marker noise by over 20% at the hip and over 50% at the low back. Simulated joint angles were generally within of recorded values when REA was used to generate a simulation from experimental gait data. REA can thus be used as a basis for generating accurate simulations of subject-specific gait dynamics.