Foster moved to Washington, D.C. under Republican President Ulysses S. Grant, as well as had a summer home in Watertown, New York. As a reward for his political service after the Republican Party split in 1872 as a result of scandals and rampant corruption in Grant's first administration, successive Republican Presidents Grant, Rutherford B. Hayes and James A. Garfield appointed Foster the U.S. Ambassador to Mexico, then to Russia. President Chester A. Arthur made Foster the United States Ambassador to Spain. In Benjamin Harrison's administration, Foster served as a State Department "trouble shooter" before becoming Secretary of State for the final six months of Harrison's term. As such, Foster replaced James Gillespie Blaine, who had succumbed to Bright's disease, of which he later died. As Secretary of State, Foster "helped direct the overthrow of the Hawaiian monarchy." After leaving public office, Foster remained in Washington and invented a new type of legal practice, lobbying for large "corporations seeking favors in Washington and chances to expand abroad." Foster also used his government and political contacts to secure legal fees as counsel to several foreign legations. He also continued to serve Presidents part-time on diplomatic missions. As such, Foster negotiated trade agreements with eight countries, brokered a treaty with Britain and Russia concerning seal hunting in the Bering Sea, and negotiated the Treaty of Shimonoseki of 1895 (technically as legal consultant and commissioner for the Qing Dynasty in which China recognized Korean independence as well as ceded Taiwan to the victorious Japanese after the First Sino-Japanese War. In 1903, Foster published American diplomacy in the Orient, followed in 1904 by Arbitration and the Hague Court. In 1906, he wrote The practice of diplomacy as illustrated in the foreign relations of the United States. These are among the many books written by John Watson Foster.
Family
Three of Foster's children never reached adulthood. Foster sent his son to Princeton. Foster doted on his daughters' grandchildren, regaling them with tales of life on the frontier as well as in foreign lands. His daughter Edith Foster married Presbyterian minister Allen Macy Dulles, and their children included John Foster Dulles and Allen Welsh Dulles,. Foster's daughter Eleanor married State Department legal advisor Robert Lansing ; their niece Eleanor Lansing Dulles became an economist and diplomat. Foster is also the great-grandfather of the noted Catholic convert and theologian CardinalAvery Dulles.