Freire (also known as Freyre) was born in Carmona, Spain near Seville, to a Spanish cavalry officer from Galicia, Francisco Freire de Andrade, and his wife Josefa Armijo y Bravo, also from Carmona. He joined his father's Alcántara cavalry regiment as a minor cadet when just seven years old, and on 1 January 1780 became an ordinary cadet. He participated in his first battle on 15 May 1793, against revolutionary French forces during the opening of the Battle of Mas Deu, part of the War of the Pyrenees. Freire spent the next two years in Rousillon and Catalonia, including that war's last actions during which Spanish forces recaptured Puigcerda and Bellver (after the peace treaty had been signed). Freire received several promotions during that war, having been named a junior lieutenant on 10 October 1793, full lieutenant on 20 November, "ayundante" on 13 December 1793, captain on 18 February 1794, and cavalry captain on 28 July 1795. During the following peace, Freire was promoted to sergeant major, then command of a squadron on 4 April 1801. He later participated in a campaign against Portugal in Arronches, before being assigned to training in Mallorca.