He resumed the practice of law after the war, and became active in New York state politics. He was United States Attorney for the Eastern District of New York from 1866 to 1877. In December 1881, he was appointed by Governor Alonzo B. Cornell to the New York Court of Appeals to fill the vacancy caused by the appointment of Judge Charles Andrews as Chief Judge after the resignation of Charles J. Folger. Tracy remained on the bench until the end of 1882 when Andrews resumed his seat after being defeated by William C. Ruger in the election for Chief Judge.