Indignant at such arbitrary treatment, Louis Lacy wrote bitter and fiery letters to the captain-general, who made him a prisoner, and brought him before a Consijo de Guerra, or court-martial, by sentence of which he was condemned to imprisonment as one labouring under mental alienation, and, after all his gallant services, was deprived of his commission.

After a time he was permitted to return to Spain, and was sent to Cadiz en retrait.

At that time Spain, having made peace with France, was at war with John VI. of Portugal. This contest was productive of no important event, and was terminated in 1801. Lacy arrived in Europe just as the last campaign was opened against the Portuguese; and hearing of it, he vainly solicited from the government of Charles IV. the honour of being permitted to serve in the Spanish army as a simple grenadier; but the mal-influence of his enemy, the Governor of the Canaries, still followed him, and this humble request was refused him. Poor Lacy, in bitterness of spirit and almost without a coin in his purse, resolved to push his fortunes elsewhere. He wandered on foot through the Peninsula, crossed the Pyrenees, and, like an humble wayfaring pedestrian, passed through France, and arrived at the town of Boulogne-sur-mer in October, 1803, when Bonaparte was assembling his great army for the invasion of Britain.

Finding himself destitute, and without resources, Lacy enlisted in the 6th Regiment of light infantry of the French line, as a private soldier; but his previous military knowledge, which was soon discovered by his comrades and officers, obtained for him, in one month, the rank of sergeant. About the same time General Clarke (who was afterwards, in 1809, created Duc de Feltre) having heard of him, related the history of Lacy, of his father and uncle, to the Emperor Napoleon. Struck by a narrative so singular, Napoleon sent for the sergeant, and being charmed by his manner and bearing, in virtue of the rank he had previously held, generously gave him the commission of captain in the Irish Legion, which was then being organized at Morlaix, under Arthur O'Connor, for the service of France. General Clarke, Minister of War under Napoleon, being of Irish descent, had the idea of gaining over some of the old Irish aristocracy; and Nadgett, another Irishman in the Foreign Office, had a scheme for enlisting Irish prisoners in the French prisons; a scheme which proved, however, unsuccessful. Arthur O'Connor had been M.P. for Philipstown, but rebelled in 1798, and after being imprisoned at Dublin, and tried for high treason at Maidstone, he was acquitted. In France he became a general, married the daughter of the Marquis de Condorcet, and died at Bignon in 1852.

From Morlaix Lacy marched with his regiment to Quimper-Corentin, an old manufacturing town in the departement of Finisterre; and while there became acquainted with a pretty French girl, Mademoiselle Guermer, to whom he became attached, and whom he married, in June, 1806, although her parents—old royalists probably—were bitterly opposed to her espousing a soldier of fortune in the Legion of Exiles.

Lacy was then in his thirty-first year.

Three days afterwards the Irish Legion marched for Antwerp, and he took his wife with him. From Antwerp the Irish went to the pestilential Isle of Walcheren; there also his young wife accompanied him, and he obtained a majority.

In 1807, he was appointed Chef-du-Battailon of the Irish attached to the army which Murat, Grand Duke of Berg, was to command in Spain, for the purpose of accomplishing Bonaparte's unjustifiable scheme of usurpation and conquest.

Lacy's generous mind became deeply agitated at the prospect of being obliged to serve against that nation among whom his exiled family had found a home; and, notwithstanding the bitterness yet rankling in his mind against those who had treated him so ill in Spain, and who had dismissed him from the Regiment of Ulster, he determined not to draw a sword against the country of his father's adoption, and with sorrow sent his young wife, with their infant son, back to her family at Quimper, there to await the settlement of the Peninsular affairs. As Chef-du-Battailon, he still remained with the army which crossed the Pyrenees, in virtue of the base conspiracy of the Escurial, and which marched unmolested through the barrier-towns of San Sebastian, Figueras, Pampeluna, and Barcelona, in the spring of 1808; and in the summer of that year he found himself with the French army at Madrid.