after leaving congress, he moved to new york city in 1892 and resumed the practice of law. he was appointed by president grover cleveland as assistant secretary of the navy and served from march 20, 1893, to april 18, 1897, when he resigned. he was appointed to serve as new york city police commissioner in 1904 and 1905. later he resumed the practice of law and also engaged in literary pursuits. he was appointed by mayor william jay gaynor as chief magistrate of the city magistrates' courts, first division, city of new york on july 1, 1910, in which capacity he served until his death. he died in at his home at 1192 park avenue in manhattan, new york city on june 7, 1930, from arteriosclerosis and apoplexy. he was interred in woodlawn cemetery in the bronx.