The high strength-to-weight ratio of magnesium alloys makes them attractive for automotive applications. These materials have been used for the engine cradle, seat frame, and shock tower applications to reduce vehicle weight. Despite these advantages, there are limiting factors to the application of magnesium alloys. One of these factors is the joining of magnesium alloys. Although there are various joining processes available, self-piercing riveting (SPR) is particularly promising. It provides not only the speed but also the necessary structural strength. However, because of the large amount of deformation associated with the process and the limited formability of magnesium at room temperature, SPR often results in part cracking of the riveted magnesium alloys, which reduces the part quality. In this study, a method of preheating the magnesium alloy before riveting was adopted to improve the joint quality. The fabrication of the desired SPR joints was investigated as a function of the preheat temperature and strain rate. To determine the optimum preheat temperature, Zener–Hollomon parameter was employed. Experiments were conducted to validate the proposed preheat temperature. Magnesium alloy AZ31 with a thickness of 2 mm was preheated with various temperatures prior to self-piercing riveting. The appearances, cross-sections, and mechanical tests of the SPR magnesium AZ31 joints were investigated. It was found that a preheat temperature of 180–200°C largely eliminated the discrepancies in SPR 2 mm thick magnesium AZ31 joints. The joint strength increases with increasing preheat temperature from ambient to 200°C. The strength increase is attributed to the reduction in joint discrepancies and an increase in mechanical interlock between the rivet and work pieces. The current findings on the development of a method can be used to determine the preheat temperature for self-piercing riveting of magnesium castings.