Abstract This research article examines the effect of increasing the tool rotational speed and post-weld heat treatment behavior of friction stir-welded AZ31-B magnesium alloy. The variable tool rotational speeds of 1000 rpm, 1200 rpm, 1400 rpm, and 1600 rpm with fixed tool traverse speeds of 30 mm min−1 were chosen based on the trial welding method. Results reveal that the as-welded tensile strength values of 133 MPa, 209 MPa, 215 MPa, and 213 MPa for the corresponding tool rotation speeds and post-weld heat-treated tensile strength values of 140 MPa, 213 MPa, 223 MPa, and 227 MPa significantly increased joint strength when compared to the as-welded process. The measured grain size values are reduced when the tool rotational speed increases due to material dynamic recrystallization. Al-Mg brittle intermetallic compounds significantly reduced the mechanical strength during the increase of the tool’s rotational speed. Fractography analysis reveals all welded samples fractured at the center of the stir zone with a ductile fracture angle of 45°.