From 1869 to 1873, Porter was the personal secretary of President Ulysses S. Grant, and he was the U.S. ambassador to France from 1897 to 1905 and he paid for the recovery of the body of John Paul Jones, sending it to the United States for reburial. He received the Grand Cross Legion of Honor from the French government in 1904. He wrote two books, Campaigning with Grant (1897) and West Point Life (1866).