This paper aims at describing a new method to simulate the locomotion of hemiplegic subjects. To this end, we propose to use inverse kinematics in order to make the feet follow a trajectory with respect to the root frame linked to the pelvis. The 11 degrees of freedom are then retrieved by inversing the kinematic function while taking other constraints into account. These constraints, termed secondary tasks impose that the solution ensures joints limits and energy minimisation. In addition to those general constraints, the main originality of this work is to take spasticity into account. This new constraint is obtained according to the specificity of the subject’s pathology. The results show that angular trajectories for the pelvis, the hips and the knees for the simulated and the real motion are very similar. This preliminary work is promising and could be used to simulate the effects of reeducation or medical treatments on patients’ gait.