On November 16, 1813, he was named colonel in charge of the Queen's Talavera Regiment.
At the head of this unit, he set sail for Peru on December 25, 1813.
On April 24, 1814 they disembarked at Callao to aid the Viceroy José Fernando de Abascal y Sousa, who had been working arduously to maintain his viceroyalty and the bordering territories under Spanish control.
Maroto and his troops, placed under the orders of Brigadier Mariano Osorio, were sent to Chile, which, during the Napoleonic Wars, had risen in rebellion.
They embarked July 19, 1814, arriving at the naval base of Talcahuano, the nucleus of royalist activity, August 13.
Osorio succeeded in organizing, along with local elements, a mobile army of some five thousand men, of whom Maroto's troops were practically the only Spaniards.

On October 1, the insurgents started to battle in Rancagua in an attempt to prevent the expeditionaries from taking Santiago, Chile.
Maroto, manifesting a disdain for his opponents typical of officials recently arrived in the Americas, ordered his troops to attack the enemy fortifications without bothering to send in either scouts or guerrillas.
The result was that Maroto's Talaveras, bombarded by the volley of shots, were forced to retreat with heavy losses.
On the next day, Bernardo O'Higgins managed to make his way past the royal troops and retreat to the capital, where his opponents entered without resistance a few days later.
Whether due to a belief that Maroto had conducted himself clumsily in battle or due to other, unknown reasons, although the list of officials who ought to be promoted after the latest victories sent by Osorio to viceroy Abascal included Maroto's name, the messenger who delivered the list nonetheless had confidential instructions to let Abascal know that Osorio believed that Maroto should not be promoted.
When Maroto received word several months later that the list that had been sent to Madrid did not include his name, he lodged the appropriate complaint with Abascal, who had not liked the confusing way of proceeding and ended up finding in Maroto's favor on May 10, 1815, granting him the grade of brigadier, backdated to 8 November 1814.

During his stay in Santiago, Maroto entered into a relationship with Antonia Cortés, who belonged to a noble and wealthy family of the local oligarchy; they married at the end of March 1815, just before he left Santiago, a place which he apparently did not find particularly to his taste.
Immediately after, leading two companies, Maroto headed to Arica to aid in the campaign of Joaquín de la Pezuela in  Alto Perú, now Bolivia.
On July 15 he joined his troops, but he did not remain with them long because, for unknown reasons, Pezuela sued him and sent him to Lima.
The trial was interrupted through the mediation of Abascal, who convinced Pezuela that it wasn't worth the trouble to continue.
After spending some time in Lima, Maroto returned to Chile, whose command had fallen back into the hands of Field Marshal Casimiro Marcó del Pont, with whom he soon fell in disfavor.

At the beginning of February 1817 the troops of José de San Martín crossed the Andes to put an end to Spanish dominion in Chile.
In the face of the disintegration of the royalist forces, Maroto proposed abandoning the capital and retreating southward, where they could hold out and obtain resources for a new campaign.
The military conference called by Marcó on February 8 adopted Maroto's strategy, but the following morning the captain changed his mind and ordered Maroto to prepare for battle in Chacabuco.
The night before the combat, Antonio Quintanilla, who would later distinguish himself extraordinarily in the defense of Chiloé, confided with another official regarding the ill-chosen strategy and that, given the position of the insurgents, the royalist forces ought to retreat a few leagues towards the hills of Colina: "Maroto overheard this conversation from a nearby chamber and either couldn't or refused to hear me because of his pride and self-importance, called on an attendant with his notorious hoarse voice and
On November 16, 1813, he was named colonel in charge of the Queen's Talavera Regiment. At the head of this unit, he set sail for Peru on December 25, 1813. On April 24, 1814 they disembarked at Callao to aid the Viceroy José Fernando de Abascal y Sousa, who had been working arduously to maintain his viceroyalty and the bordering territories under Spanish control. Maroto and his troops, placed under the orders of Brigadier Mariano Osorio, were sent to Chile, which, during the Napoleonic Wars, had risen in rebellion. They embarked July 19, 1814, arriving at the naval base of Talcahuano, the nucleus of royalist activity, August 13. Osorio succeeded in organizing, along with local elements, a mobile army of some five thousand men, of whom Maroto's troops were practically the only Spaniards.
On October 1, the insurgents started to battle in Rancagua in an attempt to prevent the expeditionaries from taking Santiago, Chile. Maroto, manifesting a disdain for his opponents typical of officials recently arrived in the Americas, ordered his troops to attack the enemy fortifications without bothering to send in either scouts or guerrillas. The result was that Maroto's Talaveras, bombarded by the volley of shots, were forced to retreat with heavy losses. On the next day, Bernardo O'Higgins managed to make his way past the royal troops and retreat to the capital, where his opponents entered without resistance a few days later. Whether due to a belief that Maroto had conducted himself clumsily in battle or due to other, unknown reasons, although the list of officials who ought to be promoted after the latest victories sent by Osorio to viceroy Abascal included Maroto's name, the messenger who delivered the list nonetheless had confidential instructions to let Abascal know that Osorio believed that Maroto should not be promoted. When Maroto received word several months later that the list that had been sent to Madrid did not include his name, he lodged the appropriate complaint with Abascal, who had not liked the confusing way of proceeding and ended up finding in Maroto's favor on May 10, 1815, granting him the grade of brigadier, backdated to 8 November 1814.
During his stay in Santiago, Maroto entered into a relationship with Antonia Cortés, who belonged to a noble and wealthy family of the local oligarchy; they married at the end of March 1815, just before he left Santiago, a place which he apparently did not find particularly to his taste. Immediately after, leading two companies, Maroto headed to Arica to aid in the campaign of Joaquín de la Pezuela in  Alto Perú, now Bolivia. On July 15 he joined his troops, but he did not remain with them long because, for unknown reasons, Pezuela sued him and sent him to Lima. The trial was interrupted through the mediation of Abascal, who convinced Pezuela that it wasn't worth the trouble to continue. After spending some time in Lima, Maroto returned to Chile, whose command had fallen back into the hands of Field Marshal Casimiro Marcó del Pont, with whom he soon fell in disfavor.
At the beginning of February 1817 the troops of José de San Martín crossed the Andes to put an end to Spanish dominion in Chile. In the face of the disintegration of the royalist forces, Maroto proposed abandoning the capital and retreating southward, where they could hold out and obtain resources for a new campaign. The military conference called by Marcó on February 8 adopted Maroto's strategy, but the following morning the captain changed his mind and ordered Maroto to prepare for battle in Chacabuco. The night before the combat, Antonio Quintanilla, who would later distinguish himself extraordinarily in the defense of Chiloé, confided with another official regarding the ill-chosen strategy and that, given the position of the insurgents, the royalist forces ought to retreat a few leagues towards the hills of Colina: "Maroto overheard this conversation from a nearby chamber and either couldn't or refused to hear me because of his pride and self-importance, called on an attendant with his notorious hoarse voice and 
Rafael Maroto