Reciprocating spur gear rack is prone to lubrication failure near the reversing dead center position. Ree‐Eyring lubrication fluid, multigrid method and multigrid integral method were used to calculate the pressure profile, film thickness and oil temperature rise. Compared with linear motion, the process of reciprocating commutative movement is more complicated and the lubrication state are more unstable. The effects of different reversing duration time and commutation meshing state on lubricant film were analysed. The results show that, the oil thickness during the gear reversing process is significantly reduced. While shortening the reversing time can improve the lubricating film thickness, it causes the instantaneous oil temperature to rise. Therefore, the gear tooth damage caused by high temperature can be avoided by prolonging the reversing duration time properly. The longer the reversing duration time, the minimum value of central film thickness and central pressure is closer to the meshing outlet area. No matter what the reversing time change, the minimum lubrication film thickness is in the reversing dead center position. So the reversing dead center is still the dangerous point for the lubrication failure of the spur gear rack mechanism. When the reversing dead center is in the leading tooth of double‐tooth meshing, the gear has the largest film thickness and the largest contact area. In addition, the synthetic radius of curvature and entrainment velocity become larger so the lubrication conditions have been improved. The results provide the theoretical basis and guidance for the reasonable design of the spur gear rack and the improvement of its lubricating performance.