High coercivity and anti-corrosion properties are required for sintered Nd-Fe-B magnets used in new energy and off-shore wind power industries. Here, we found that both magnetic properties and corrosion resistance of Nd-Fe-B magnets can be significantly improved by grain boundary diffusion (GBD) of Tb69Ni31 alloy. The diffusion temperature is a key factor in determining both the magnetic properties and corrosion resistance. The wettability of Tb69Ni31 alloy with the magnet and the fluidity of Tb69Ni31 alloy gradually increase with increasing temperature above 750 ℃, which facilitates the elements diffusion. Tb and Ni show different diffusion behaviors at different temperatures. The magnet diffused at a relatively high temperature exhibits high coercivity due to the formation of a thick Tb-rich shell in the grain with high magnetocrystalline anisotropy field. However, excessive grain growth leads to a reduction in coercivity as the diffusion temperature further increases. The highest corrosion resistance is achieved by Tb69Ni31 alloy diffusion at a relatively lower temperature. By analyzing the Volta potential distribution using scanning Kelvin probe force microscopy, the Ni-rich phase with high potential formed in grain boundaries is mainly responsible for the improved corrosion resistance. The current results suggested that the performance of Tb-Ni diffused magnets can be controlled by the diffusion behaviors of Tb and Ni.