Diffusion process by Nd-Al and Pr-Al alloys was compared and investigated in Nd-Fe-B thin films. Enhanced coercivity 2.06T and good squareness was obtained by using Pr85Al15 and Nd85Al15 alloys as diffusion sources. But the coercivity of diffusion-processed thin films by Pr70Al30 and Pr55Al45 alloys decreased to 2.04T and 1.82T. High ambient coercivity of 2.26T was achieved in diffusion-processed thin film by Nd70Al30 leading to an improved coercivity thermal stability because Nd2Fe14B grains were enveloped by Nd-rich phase as seen by transmission electron microscopy Nd-loss image. Meanwhile, microstructure-dependent parameters α and Neff were improved. However, high content of Al in diffusion-processed thin film by Nd55Al45 lead to degraded texture and coercivity.