O'Donojú was born in Seville of Irish descent He joined the army at a young age and served with distinction in the Peninsular War, also known as the "Spanish War of Independence". O'Donoju was the Chief of Staff to GeneralGregorio García de la Cuesta during the Battle of Talavera. On 11 July 1809, O'Donojú served as an interpreter between Cuesta and the British commander, Lieutenant-GeneralSir Arthur Wellesley, as the two met to make their campaign plans. The meeting was somewhat strained as Cuesta answered many of Wellesley's questions with a simple "yes" or "no" which O'Donojú tactfully explained. In 1814, O'Donoju was named Minister of War by the Regency. With the return of Ferdinand VII, he became aide de camp to the king. O'Donoju was a friend of the liberal rebel Rafael del Riego. In 1820, at the time of the re-establishment of the Spanish Constitution of 1812, O'Donoju was the captain general of Andalusia. O'Donoju reached the rank of lieutenant general and was a high officer in the Spanish Freemasons. In 1821, the Cortes Generales appointed him captain general and "jefe político superior", which gave him the authority of the former viceroys. At the time O'Donojú left for New Spain, the Cortes was considering to greatly expand the autonomy granted to the overseas Spanish possessions according to the restored constitution. O'Donoju was sworn into his new offices upon his arrival in Veracruz on 21 July 1821. He found that the entire country except for Veracruz, Mexico City and Acapulco supported the Plan de Iguala and the rebel general, Agustín de Iturbide. On 3 August 1821, in Veracruz, O'Donoju issued a proclamation of his liberal principles to the people of Mexico. He wrote to Iturbide, inviting him to a conference in a location of his choosing. Iturbide chose the city ofCórdoba as the meeting place. O'Donojú, accompanied by Colonel Antonio López de Santa Anna, arrived there on 23 August, and the following day the meeting occurred. The men reached an agreement and signed an accord, the Treaty of Córdoba, based on the Plan de Iguala. The only part of the Plan de Iguala that was amended was Article 4, concerning the functions of the governmental junta. The new Article 4 also provided that if no member of the Bourbon family accepted the crown of New Spain, the Mexican Cortes would freely elect their monarch. Under the circumstances, that effectively granted the crown to Iturbide. The military leaders of the Spanish in the colony did not accept independence. Spanish troops occupied the plazas of Mexico City and Veracruz, the fort of San Carlos de Perote, and the castle of San Diego in Acapulco. They were blockaded and all but Veracruz was surrendered. Francisco Novella was besieged in Mexico City by the Army of the Three Guarantees, led by Vicente Guerrero and Nicolás Bravo. Novella agreed to a suspension of hostilities. Colonel Santa Anna besieged Brigadier García Dávila in San Juan de Ulúa, Veracruz, but the latter was able to hold out for four more years. O'Donojú used his influence to withdraw Spanish troops from the country with a minimum of bloodshed through reasonable surrender terms. He then approved the promotion of Novella, the previous acting viceroy, to field marshal. On 13 September 1821, O'Donojú met with Novella and Iturbide at the Hacienda de la Patera, near the Villa de Guadalupe, smoothing over the difficulties and arranging the details of the transfer of power. Novella ordered Spanish troops to leave Mexico City. The insurgents entered the capital on 24 September 1821, two days after the Spanish troops left Mexico City. On 27 September 1821, O'Donojú and, on 28 September 1821, Iturbide decreed the independence of the Mexican Empire from Spain. Together with thirty-three others, O'Donojú was a member of the Provisional Governing Junta, headed by Iturbide. O'Donoju signed the Act of Independence on 28 September 1821. On 3 October 1821, the Captaincy General of Guatemala proclaimed its independence from Spain and its incorporation into the Mexican Empire. The region had been formally subject to New Spain throughout the colonial period, but as a practical matter, it was administered separately. All but Chiapas soon separated from Mexico. O'Donojú died of pleurisy in Mexico City on 8 October 1821; some historians suspect that he was poisoned by Iturbide. The suspicion is based on the declarations of Carlos María Bustamante, a parliamentarian and writer. O'Donoju's remains were interred with the honors of a viceroy in the vault of the Altar of Kings in the Cathedral of Mexico.