Molecular dynamics simulations of nanoscratching are performed with emphasis on the correlation between the scratching conditions and the defect mechanism in the substrate. More than six million atoms are described by the embedded atom method (EAM) potential. The scratching process is simulated by high-speed ploughing on the Al(111) surface with an atomic force microscope (AFM) tip that is geometrically modelled to be of a smoothed conical shape. A repulsive model potential is employed to represent the interaction between the AFM tip and the Al atoms. Through the visualization technique of atomic coordination number, dislocations and vacancies are identified as the two major defect types prevailing under nanoscratching. Their structures and movements are investigated for understanding the mechanisms of defect generation and evolution under various scratching conditions. The glide patterns of Shockley partial dislocation loops are obviously dependent upon the scratching directions in conjunction with the slip system of face-centred cubic (fcc) single crystals. It is shown that the shape of the AFM tip directly influences the facet formation on the scratched groove. The penetration depth into the substrate during scratching is further verified to affect both surface pile-up and residual defect generations that are important in assessing the change of material properties after scratching.