There is provided a magnetic field generator (10) and a method of manufacturing it, capable of reducing decline in the magnetic field intensity and deterioration of magnetic field uniformity during transportation.The magnetic field generator (10) includes a pair of plate yokes (12a), (12b). The plate yokes (12a), (12b) are opposed to each other, with their opposing faces provided with permanent magnet assemblies (14a), (14b) respectively. The permanent magnet assemblies (14a), (14b) have faces opposing to each other, to which pole pieces (16a), (16b) are fixed respectively. The permanent magnet assemblies (14a), (14b) include permanent magnets (18). The pole pieces (16a), (16b) include annular projection (24) and permanent magnets (28) for prevention of magnetic flux leakage provided on an outer side surface of the annular projection (24). The permanent magnets (18), (28) include R—Fe—B magnets magnetized to a magnetization rate not smaller than 80% and not greater than 99.9%. When manufactured, the assembled magnetic field generator (10) is heated in its entirety at a temperature not lower than 40° C. and not higher than 70° C.