He was most notably the only non-British General to have commanded one of the Anglo-Portuguese divisions of Wellington's Peninsular Army (the seventh, in late 1813), as well as having commanded the Portuguese forces who invaded the Banda Oriental del Uruguay (Eastern Bank of Uruguay) in 1816.
His last name is sometimes written as Lecór or Le Cor. The latter is very common in English sources of the 19th century. Most Spanish sources give him as Carlos Federico Lecor.
Son of Louis Pierre Lecor, a French émigré, and Quitéria Maria Krusse, Carlos Frederico Lecor was born in the Parish of Santos-o-Velho, in Lisbon. He had French ascendency by his father, and German, Dutch and Spanish ascendency by his mother.
He was born into merchant families, and, as the older son of five, was destined to pursue a commercial career. Instead, having moved to Faro in the decade of 1770, he would eventually enlist in the Portuguese Army, as a Pé de Castelo (Castle Guard) in 1793, as a gunner, at the unusual age of 29.
Having been placed at the Fortress of Santo António da Barra, in Tavira, he rose to the rank of Sargeant. He was then made an adjutant to the military commander of Portimão, presumably at officer level. In 1794, he became first lieutenant in the Artillery Regiment of Algarve, as second in command to the ninth company of gunners.
In 1795 and 1796, he was part of the artillery complement of the Nau Príncipe da Beira, the flagship of a fleet escorting commercial ships to Salvador, in Brazil. Upon returning to Lisbon, he was promoted to Captain in the Light Troops Legion, an experimental unit of the Portuguese Army, eventually becoming the aide-de-camp to General Marquis of Alorna. In this capacity he was promoted to Major (1802) and Lieutenant-Colonel (1805).
On the occasion of the first French Invasion of Portugal, in November 1807, Carlos Frederico Lecor is credited with having spotted the invading army, commanded by Junot, north of Abrantes, and having personally informed the Prince-Regent, future King John VI.
As Lecor didn't want to serve in the Légion Portugaise, formed out of the remnants of the dismantled Portuguese Army to serve Napoleon, he fled to Plymouth, England, hoping to embark to Brazil, but on hearing the news of the Portuguese uprisings of June 1808, he participates in the creation of the Loyal Lusitanian Legion, a military unit created by the Portuguese exiles in England. He then returns to Portugal, with colonel Robert Wilson. Despite being originally made responsible for the recruitment of a second battalion of the Legion, he is made colonel of the 23rd Infantry Regiment, in Almeida, in December 1808.
Between 1809 and 1813, Lecor acts as commander of several units in the Portuguese Army, mainly brigade-level, and as military commander of the Beira Baixa region, based in Castelo Branco. He is promoted to Brigadier General on May 8, 1811. For a brief period in 1811, he commands the Portuguese Brigade of the Allied 7th Division. He participates in the Bussaco campaign, as well as the Lines of Torres Vedras, under general Rowland Hill.
On the eve of the Vitoria Campaign, in 1813, Lecor is placed again at the command of the Portuguese Brigade (later numbered sixth) of the seventh Division of the Anglo-Portuguese Army, under the command of Lord Dalhousie. He is promoted to Major General (Marechal de Campo) on June 4, 1813. He then goes on to fight in the Battle of Sorauren, as brigade commander and the Battle of Nivelle, as acting commander of the 7th Division. He is then placed as the commander of the Portuguese Division, where he is till the end of the war, participating at the Battle of the Nive, on its last day, also called the Battle of St. Pierre.
Having returned to Portugal, in mid-1814, after the conclusion of the Peninsular War, Lecor is appointed military governor of the Alentejo for a brief period of time.
In June, 1815, he is promoted to Lieutenant General and appointed commander of the Prince's Royal Voluntary Division (Divisão de Voluntário Reais do Príncipe) a unit to be sent for service in Brazil, made up mostly of peninsular veterans.
In 1816 he led the successful Portuguese conquest of the Banda Oriental against the Liga Federal of José Gervasio Artigas, who had liberated the Banda Oriental (present-day Uruguay) from Spanish rule the year before.
He personally ruled the newly conquered Cisplatina Province, until the Cisplatine War of 1825–1828. During this war, he succeeded in defending Montevideo against an Argentine-Uruguayan siege, but when Uruguay became independent in the peace treaty, he had to return to Brazil.