Several attempts were made to break up the band [of Lafitte's pirates] and the U.S. Grand Jury more than once indicted Lafitte, but the government could never arrest him. At the very time when a Federal force was being equipped to descend upon the settlement of Barataria, the pirates were able to do the United States a great service, which saved New Orleans from capture by the British, and won for Lafitte the title of the "pirate patriot." When the British were arranging their expedition against the city, they prepared to advance on it by way of Barataria, and sent a man-of-war to the island to make terms with Lafitte and secure the co- operation of the pirates in capturing New Orleans, offering as a bribe a large sum of money and to Lafitte personally a commission as captain in the British navy.
Lafitte affected acquiescence in these proposals, but at the same time warned Governor Claiborne of the approach of the British, and thus enabled the United States to take steps for the defence of the city and to send General Jackson there.
Notwithstanding Lafitte's services, an expedition was fitted up against the pirates and the settlement captured. The Baratarians were ironed and committed to the Calaboose at New Orleans, and their spoils, consisting of an immense amount of valuable goods, money, etc., seized and conveyed to the city.
At the battle of New Orleans, General Jackson being short of gunners, appointed several of Lafitte's men to the artillery, where they did good service. [Source]