Giuseppe entered the temporary government of Brescia and organized the Brescian Legion that General Bonaparte sent to fighting in Emilia, Marche and then in Central Italy.
It was in Città di Castello, in 1798, that happened the famous episode of the discussed donation of Raphael's painting "The Marriage of the Virgin" to Giuseppe Lechi by the City Council.
More and more bound up with the "Murat's circle", General Lechi joined the Masonry of the Scottish Rite (becoming in the follow the Great Master of the Grand Lodge of Naples) and those groups of patriots who supported the ideal of the Italian unification.
In 1809 he faced a trial in France (apparently for claims of violence, embezzlement and abuse) but escaped the judgment and was sent back to Naples at the service of his friend, the new king, Joachim Murat.
On 31 January 1814, Giuseppe was governor of Tuscany handing over Livorno to the English Fleet in an attempt made by Murat to bargain a separate peace with Austria.