Magnesium (Mg) alloys have been extensively researched to widen their uses due to their outstanding particular features and the fact that they are one of the lightest metals. Mg alloys could be used in a variety of industries, including aircraft, shipbuilding, automobiles, railways, and many more. Mg alloy welding is recognized as one of the most difficult processes in a variety of industries. Because of its ability to generate a high-quality joint, friction stir welding (FSW) of Mg alloys has sparked a lot of research and industry interest. Heat treatment after welding is an effective way to improve the characteristics and performance of welded joints. Therefore, the FSW process was used to prepare Mg alloy weld joints and diverse heat treatment conditions were applied. The microstructure and mechanical properties of as-welded and heat-treated FSW butt-joints made of dissimilar AZ31 and AZ91 plates were studied. It was observed that holding times of 30 min and 60 min were prosperous in recrystallizing the grain and enhancing the microstructure of the weld zones. The holding time of the heat treatment cycle was found to smooth the microhardness profile in this order: 60 min>30 min>15 min. The post-weld heat treatment (PWHT) for 60 min has been found to improve both tensile strength and percentage elongation. Heat treatment enhanced the ductility of joints. As a result, the tensile failure mode was altered from brittle to ductile. PWHT joints had the highest impact energy of 4.2 J for 30 min, which was around 93% that of welded joints.