Magnesium alloy AZ31B and titanium TA2 were welded by resistance spot welding technology employing an interlayer of aluminum foil and asymmetric electrodes. The microstructure of the joint was observed, with an analysis conducted on the impact of welding current and welding time on the tensile shear load of the joint. During the welding process, the aluminum interlayer melted and blended with the molten magnesium alloy, leading to the formation of a eutectic layer consisting of Mg17Al12 and (Mg) in close proximity to the welding interface. As the increasing of welding current or the extending of welding time, there was an initial increase followed by a slight decrease in the tensile shear load of the AZ31B/TA2 joint. At a welding current of 16 kA, the tensile shear load of the joint achieved the maximum, which was approximately 6.48 kN. The findings suggest that it is effective to use an aluminum foil as an intermediary to regulate the metallurgical reaction at the interface and utilize nonsymmetrical electrodes for thermal compensation in the resistance spot welding between titanium and a magnesium alloy.