Anisotropic Nd–Fe–B thin films with c-axis texture are fabricated by dc magnetron sputtering on heated Si substrate. The influence of Ti or Mo buffer layer thickness and substrate temperature on the surface morphology, the domain structure and the magnetic properties are investigated and compared for the Nd–Fe–B films. It is found that the morphology of the surface strongly depends on the thickness of the buffer layer. A rough surface is observed if there is no buffer layer between the substrate and Nd–Fe–B layer or the buffer layer is too thick. Mo shows to be the better candidate for the buffer layer for its perfect lattice match with the Nd–Fe–B layer. The best values for the maximum energy products are 11.9 and 14.8 MGOe for the Nd–Fe–B films with Ti and Mo buffer layers, respectively.