Evarts early associated himself with the city's Whig interests dominated by Thurlow Weed. In 1849 he received the appointment of assistant United States attorney for the district of New York. He served until 1853. In 1851 he was also made a commissioner of the Almshouse (later known as the Commissioners of Charity and Correction). The most famous case Evarts was involved in while district attorney was against the famous journalist John L. O'Sullivan and his fellow filibusters, who had fitted out the "Cleopatra" to aid an insurrection in Cuba. After a month-long trial, the jury was unable to come to a verdict.