To study the effect of annealing temperature on the joints between magnesium and aluminum alloys, and improve the properties of bonding layers, composite plates of magnesium alloy(AZ31 B) and aluminum alloy(6061) were welded using the vacuum diffusion bonding method. The composite specimens were continuously annealed in an electrical furnace under the protection of argon gas. The microstructures were then observed using scanning electron microscopy. X-ray diffractometry was used to investigate the residual stresses in the specimens. The elemental distribution was analyzed with an electron probe micro analyzer. The tensile strength and hardness were also measured. Results show that the diffusion layers become wide as the heat treatment temperature increases, and the residual stress of the specimen is at a minimum and tensile strength is the largest when being annealed at 250 ℃. Therefore, 250 ℃ is the most appropriate annealing temperature.