It is a fundamental trait of the nanoscale friction that the friction reduces as the number of layers increases in 2D materials. The physical origin behind it remains subject to debate. In this study, the DFT calculation results reproduce experimental observations of the layer-dependent friction in 2D materials and provide another critical insight that can grasp the trend at the atomic level. That is, the in-plane adjustment of atomic positions should be another key factor behind the layer-dependent friction besides the puckering effects, the electron-phonon coupling, and the quality of frictional contact. And it is found out that the in-plane adjustment of atomic posi-tions will reduce the charge redistributions and further decrease the friction between layers, which should be the origin of the layer-dependent friction induced by the in-plane adjustment of atomic positions. Moreover, our results can also well apprehend the effects of the adsorption strength of substrate on the layer-dependent friction in 2D materials.