"Moctezuma" participated in the Capture of Valdivia and in the Freedom Expedition of Perú as a dispatch boat. She was left in Callao, but when Cochrane arrived (1822) there he found "Moctezuma" under the flag of the new Peruvian Navy. He seized her again and put her officers ashore. He was unaware that during his absence Bernardo O'Higgins had given the sloop to San Martin as a personal present.