The embodiment of the invention provides a lane keeping method and device. When the forward torque needed for lane keeping is obtained, a lane keeping control model based on feedforward control is utilized, and due to the control model based on the feedback, the beneficial effects that the calculated amount is small, stability is high, and achieving is easy are achieved. Meanwhile, adopted travelling parameters include resistance torque, the lateral velocity deviating from a center line, the actual deviation distance between a vehicle and the lane center line and the pre-estimated deviation distance between the vehicle and the lane center line. Due to the fact that control torque in other aspects can exist in the travelling process, the finally-obtained forward torque can be influenced, the vehicle is in a lane deviating state at present, if the vehicle continues to travel, the vehicle can continue to deviate from the lane center line, and the distance that the vehicle deviates from the center line is pre-estimated in advance. Due to the forward torque obtained by combining the above parameters, the influence from the outside torque can be overcome, the vehicle overcomes the current actual deviation distance and also overcomes the deviation distance generated due to pre-estimation, and accordingly it is truly guaranteed that the vehicle travels along the current lane.