A method for removing at least one impurity from metal-based nanoparticles, including at least two heating steps. During step 1, the temperature of the nanoparticles is increased to a temperature T1, and is then maintained at T1 during a heating time that is included between 1 second and 20 years, where T1 is included between 50 °C and 300 °C.During step 2, the temperature of the nanoparticles is increased to a temperature T2, and is then maintained at T2 during a heating time that is included between 1 second and 20 years, where T2 is included between 300 °C and 600 °C.