The events of the 2nd of May—the decoying of the Royal Family to Bayonne by Bonaparte—their compulsory renunciation of the Spanish crown—and other dark transactions, decided the noble Lacy on the course he should pursue. He relinquished his command of the Irish, and quietly quitting the capital, surrendered himself a prisoner of war to the venerable Spanish general, Don Gregorio de la Cuesta, who, in his seventieth year, still held the command of the forces to which Ferdinand VII. had appointed him, as Captain-General of Castile and Leon.

Struck with the story and magnanimity of Lacy, and revering his character, Cuesta, the last of the old Spanish cavaliers, appointed him at once Lieutenant-Colonel-Commandant of the Battalion of Ledesma, which had been raised in the small province of that name, near Salamanca; and he gave all his energy and talent to discipline this regiment. For now Spain had risen bravely against the invaders, and the sturdy Asturians and Galicians, under Don Joachim Blake, a young officer of Irish parentage, had commenced the War of Independence. In all the operations of the Spaniards Lacy fought gallantly, at the head of his new regiment; but more particularly at Logrono, in Old Castile, and on the retreat to the Ebro, at Guadalaxara, thirty-two miles from Madrid; after the betrayal of which, the Spanish vanguard, which, under Venegas, had saved the army at Buvierca, by so bravely defending the pass, entered the city on the night of the 4th of December, 1809. The battalions (tercios) "of Ledesma and Salamanca, under Don Louis Lacy and Don Alexandro de Hore," skirmished for three hours with the French that night, on the banks of the Henares; but after a desperate encounter, the flower of the Spanish troops had to retire before them.

He was now appointed Colonel of the Burgos Regiment of Infantry; and in the same year defended several defiles of the Sierra Morena—that long, steep chain of mountains which the novel of Cervantes (more even than the valour of his countrymen) has made famous in Europe, and which divides Andalusia from New Castile. At Toralva he surprised and captured 3000 French cavalry, and afterwards took command of the Spanish advanced guard, with the rank of Brigadier-General.

He distinguished himself again at Cuesta della Reyna, and at the beautiful old town of Aranjuez. While Venegas occupied it, he despatched Lacy with a division to drive the enemy, 2000 strong, out of Toledo, which (as he did not wish to destroy the houses from whence they fired upon him, as it was a Spanish town) did not succeed. He next occupied Puente Larga on the Zarama, which was crossed by the foe; and the Spanish general, fearing his retreat would be cut off, ordered Lacy to destroy the Queen's Bridge, and rejoin him, which he skilfully achieved; but not before the enemy's cavalry from Cuesta della Reyna had attacked him, and driven his troops to some heights above the river, the passage of which he left Don Luis Riguelmo to defend, with three battalions and four field-pieces. He was present, also, at the engagements at Almonacid de Zoreta, on the left bank of the Tagus, where, for nine consecutive hours, he remained under fire at the head of his brigade, and where 4000 Spaniards fell; and again he met the French at the pass of Despina Perros, and in the unfortunate battle of Ocana, where Venegas, in his chivalric attempt to save his friends, the people of La Mancha, rushed, with his cavalry only, on a force consisting of 5000 foot and 800 horse, and was defeated with great loss on the 19th November, 1809.

The repeated reverses of the Spaniards after the battles of Ocana and Medellin (which was lost solely by the indecision of Don Francisco de Eguia), forced Brigadier Lacy to retire into Cadiz, where, as a reward for his services, he was named successively, Sub-Inspector, Major-General, Mariscial de Campo, and Commander of the Isle de Leon, which is a triangular tract of ground separated from the mainland by the river of San Pedro. The river side was strongly fortified, and the channel flanked by batteries; the whole position, as it contained 50,000 inhabitants, was one of great trust and importance. Here he directed the increase of the fortifications, and commanded in many of those desperate and sanguinary sorties which were made against the enemy, who boasted that the Insurrection was confined to this small corner of conquered Spain. And now ensued the long blockade, which was not raised until the British won the battle of Salamanca, in 1812.

On the 5th of May, 1811, Lacy took an active part in the battle of Chiclana, which was fought on the eastern bank of the channel of San Pedro, and immediately opposite the Isle de Leon. The brave defence at Cadiz greatly encouraged the Spaniards elsewhere.

In June he was appointed Commandant-General of Catalonia; but, unfortunately, was unable to prevent the ancient seaport of Tarragona from falling into the hands of the French. Indefatigable and unwearying, he rallied the remains of the Spanish forces, and, with the Guerillas, organized a new army, at the head of which, for a year and eight months, he maintained a constant, an obstinate, and unequal struggle with the troops of Napoleon. His glorious courage and undying perseverance gained for him, in 1812, the chief command of the army in Gallicia, about 10,000 strong. This force joined Lord Wellington; but, after active operations ceased, marched back into the province from which it was named, and went into winter-quarters. On the new campaign being opened, he appeared at the head of the brave Gallegos, and continued to display the highest military talent against the enemy, until they were driven over the Pyrenees by the British; after which, the battles of Orthes and Toulouse, and the capture of Paris by the allies, by securing the peace of 1814, restored tranquillity to ravaged Europe, and Ferdinand VII. to the throne of Spain.

Strange to say, this event, for which he had struggled so hard, was unfortunate for Lacy, who, in consequence of his known attachment to the constitution of the Cortes, was deprived of all his offices—a base return for his many noble services—and he was coldly permitted to retire in obscurity, with his family, to Vinaroz, in the province of Valencia, where he spent two years in peace, though brooding over his wrongs, and planning means of redress.

In 1816, fatally for himself, he returned to active life; for, since the death of Parlier, and other brave men, who had fallen in attempting to secure to Spain that independence for which they had struggled against France, the eyes of all the Liberalists were turned on Louis Lacy, and in him their hopes reposed.

Having gone to Calvetes, in Catalonia, to drink the mineral waters, it chanced that he met there an old companion in arms, General Milano, and his brother, Don Raphael Milano, with two other Spanish gentlemen, whose political sentiments coincided with his own; and, after several secret meetings, they boldly resolved on re-establishing the Cortes at the point of the sword; for Lacy, relying on the sympathy of several regiments, and the regard they paid to his name and achievements, hoped to make them revolt in his favour, on the 5th April, 1817, and proclaim the Constitution.