Swartwout was an active participant in Burr's venture in the West and in the conspiracy trial that resulted from it. In October 1806, he met with Gen. James Wilkinson at the Sabine front, where he delivered the cipher correspondence which was later altered by Wilkinson and presented as evidence in the conspiracy trial. After Wilkinson took command of New Orleans in November, Swartwout was one of four Burr allies he arrested for misprision of treason and sent to Washington, D.C. for trial. In February, after a hearing, Swartwout and the others were released. He then continued to Richmond to attend Burr's trial, where he was a key witness in the indictment hearing. While in Richmond, Swartwout challenged Wilkinson to a duel, but the challenge was declined. During the War of 1812, Swartwout served as the captain of a corps of light infantry known as the Iron Grays.
Collector of Customs
Swartwout's close association with Andrew Jackson and his support of Jackson in the presidential election of 1828, led to his appointment by Jackson on April 25, 1829, to the position of Collector of Customs for the Port of New York. This position had great importance, as the collection of customs in New York was one of the largest sources of income for the Federal government of the United States. Swartwout's appointment by Jackson was strongly opposed by Jackson's Secretary of StateMartin Van Buren. The recess appointment was upheld by the United States Senate on March 29, 1830, giving Swartwout a full term of four years. Before the expiration of his term, Swartwout was re-appointed by President Jackson for another term of four years, ending on March 29, 1838. As Collector, he openly aided the Texans in their struggle for independence from Mexico. He held meetings in New York where Stephen F. Austin, Branch Tanner Archer, and William H. Wharton appeared in quest of funds and supplies. He also sent provisions to Texas at his own expense and saved the two-ship Texas Navy from a consignment sale by paying for repairs to the vessels.
Embezzlement claims
Swartwout left office at the expiration of his term in 1838, retaining $201,096.40 with which to pay any pending claims that might be brought against him. He then went to England to raise money on his coal property before ensuring that his account at the customhouse was closed. After he left the country, or perhaps before, his account was "adjusted" by a subordinate and possibly by his successor, through the instigation of President Martin Van Buren. It was then alleged that Swartwout had embezzled $1,225,705.69 and fled. One of his assistants was indicted in 1841 for embezzling $609,525.71 of this sum, and, according to Swartwout's trustee, a federal court further reduced the amount by $435,052.21, leaving $181,127.77 as the amount Swartwout owed. He forfeited his personal property to pay the deficit, and returned to the United States in 1841 after federal officials assured him that they would not prosecute him.
Swartwout, Texas, now a ghosttown, was named after him for his role as supporter of early Texas colonists. It is believed that Samuel Swartwout's story is the origin of the term "Swartwouted out", which has since come to define the embezzlement of a large sum of money from the United States government and subsequent escape to a foreign nation to escape punishment.