By using density functional theory, we investigate the electronic structure of a fullerene C60 molecule doped with a nitrogen atom on its surface. We find that the impurity is strongly bonded to the carbon cage and the C60N molecule has a large magnetic moment of 3.00μB. We also study the adsorption of a boron atom on the fullerene. The bonding is not as strong but still provides a fairly stable structure. Most importantly, the C60B molecule possesses a magnetic moment of 0.99μB. Both molecular magnets should be useful for the application in magnetic detection, quantum information, and spintronics.