Herein, Mg–Y–Sm–Zn–Zr alloy samples are prepared using selective laser melting (SLM). The effect of the scanning strategy on pore defects and microhardness is investigated. Pore defects are classified into lack of fusion (LOF) defects, gas pore (GP) and keyhole (KH) defects, and irregular pore (IRP) defects according to lengths and roundness. The LOF defect is caused by powder accumulation, spheroidization, droplet solidification preferentially, and pore defects accumulation. The recoil pressure causes the GP and KH defect, and different remelting zones affect its release. The filling behavior of LOF defects at different layer rotation angles and the connection of GPs and KH defects will form IRP defects. The microhardness test shows that the average microhardness is inversely proportional to porosity. The island size of 4 × 4 mm eases the accumulation of powder at the island boundaries, prevents spheroidization, and facilitates adequate spreading of droplets. The layer rotation angle of 67° inhibits the accumulation of pore defects and facilitates the filling of pore defects. The sample with the maximum densification (98.53%) and the highest average microhardness value (95.64 HV) is obtained under this scanning strategy.