In this paper, the lubrication model of involute spur gear lubricated by MHD is established by considering different oil supply conditions and adding non Newtonian, thermal and surface texture. Using the multigrid method, the elastohydrodynamic numerical solutions of the meshing points, nodes, and exit points under different operating conditions during the meshing process are obtained. The results show that when the gear runs out of oil, using magnetic fluid lubrication can improve the lubrication condition. Compared to non textured gear meshing, the oil film thickness of textured gears participating in meshing is larger, which is beneficial for lubrication. The texture has the greatest impact on the node. By analyzing the influence of texture parameters at nodes, it can be seen that there is an optimal value for texture width, while a smaller depth is advantageous. It can be seen that the gear texture improves the pressure and film thickness distribution in the meshing area, which is beneficial for lubrication conditions and provides a reference for optimizing the tribological design of gears.