In the present research, the wear behaviour of magnesium alloy (MA) AZ91D is studied and optimized. MA AZ91D is casted using a die-casting method. The tribology experiments are tested using pin-on-disc tribometer. The input parameters are sliding velocity (1‒3 m/s), load (1‒5 kg), and distance (0.5‒1.5 km). The worn surfaces are characterized by a scanning electron microscope (SEM) with energy dispersive spectroscopy (EDS). The response surface method (RSM) is used for modelling and optimising wear parameters. This quadratic equation and RSM-optimized parameters are used in genetic algorithm (GA). The GA is used to search for the optimum values which give the minimum wear rate and lower coefficient of friction. The developed equations are compared with the experimental values to determine the accuracy of the prediction.