With the rapid development of science and technology, microscale machining has become an important topic, and lubricants play a vital role in machining. Solid lubricants are suitable for a variety of precision machining better than liquid lubricants. Molybdenum disulfide (MoS2) in 2D‐layered nanomaterials is a promising candidate for use as a solid lubricant. Herein, molecular dynamics (MD) simulations are performed to study the effects of scratch depth, speed, and temperature on the mechanical properties of Ni‐based MoS2 thin films. The results show that atom stacking and extrusion around the abrasive tip increase the friction coefficient in the indentation and scratch phases. The higher value of scratch depths, speeds, and temperatures can lead to higher friction coefficients and wider dislocation distributions. Moreover, Shockley dislocation appears in all cases at all effects, and the total dislocation length increases with the higher value of scratch depths, speeds, and temperatures.