The microstructural effect on the mechanical behaviors of gold-platinum alloys during nanoscratch is revealed. By adjusting the microstructures (crystallographic orientation, interface type, grain size, twinning thickness), the hardness, plasticity, removal rate and surface roughness of the alloys are significantly improved. The nanoscratch is performed by molecular dynamics (MD). For the single-crystal (SC) alloys, the [11¯0](111)-oriented SC alloy shows the high hardness, wear resistance and low roughness. The high dislocation density induces the strong work hardening while the horizontal twinning boundaries (HTBs) effectively improve the surface quality by hindering the elastic recovery. For the bi-crystal (BC) alloys, the BC alloy with TB exhibits the excellent plasticity and low roughness. TB can uniformly limit the dislocation slip and promote the dislocation nucleation to strengthen the plasticity and surface quality. For the polycrystal (PC) and nanotwinned-polycrystal (NTPC) alloys, the alloys with small grain size or small twinning thickness show the high removal rate and low roughness. The reduction in grain size or twinning thickness inhibits the dislocation motion and promotes the GB or TB migration to improve the surface quality and atomic removal. These results provide an important theoretical basis for the microstructural design and nanofabrication of gold-platinum alloys with smooth surface and remarkable mechanical property, expanding the application for the bimetallic materials.