Windom served as Treasury Secretary until November 13, when he resigned. On October 26, he was again elected Senator by the Minnesota Legislature, this time to fill the vacancy left by his own resignation. He re-assumed his Senate seat on November 15 and served until the end of his term on March 4, 1883. He sought re-election in 1882, but was defeated.
In 1883, he moved to New York City, where he practiced law until 1889. After President Benjamin Harrison was elected in 1888, he appointed Windom as Secretary of the Treasury. Taking office on March 8, 1889, Windom served as Treasury Secretary until his death on January 29, 1891. During the last year of his treasury service he purchased 1,145,577 acres of land from the railroad for 3 cents per acre, when others were paying $5.00.