During the past few years aluminum nitride (AlN) as an important semiconductor material has attracted more and more attention owing to its splendid physical and mechanical properties. In this paper, molecular dynamics simulations of nanoscratching process of AlN are carried out study the deformation behaviors of AlN. The effects of scratching depth on the scratching force, workpiece pile-up and dislocation formation and motion are thoroughly studied. We found that the plastic deformation of AlN is mainly caused by the dislocation nucleation and motion in the nanoscratching process. In this study, we note that the workpiece material undergoes plastic deformation predominant by dislocation activity. In order to investigate the effects of the basic factors that play an important role in the scratching process, we further performed a series of MD simulations of scratching on the AlN(0001) surface along the [-12-10] direction. And it can be seen that there is a critical scratching depth for the transformation from elastic deformation to plastic deformation. The results suggest that the friction and normal force are bigger for a larger scratching depth. We also found the phenomenon of ultra-low friction under shallow scratches of AlN in the scratching process. The ultralow friction force at the scratching depth of 1nm is because of the absence of permanent plastic deformation of workpiece. The deformation under the abrasive begins to recover after the abrasive moves forward. This is the possible reason for the occurrence of ultra-low friction. These results shed light on the material deformation mechanism in nanoscratching process of AlN.