November 1661 he became a Member of Parliament for Salisbury. In 1665 he was knighted; was returned as a Member of Parliament for Westminster on 27 February 1679, and succeeded the Earl of Rochester as a Commissioner of the Treasury, filling that office for twenty-three years and during three reigns. In 1672 he bought the manor of Redlynch in Somerset, where he built a new house in 1708–1709. In 1680 he resigned the paymastership and was made First Commissioner of Horse. In 1684 he became sole Commissioner of Horse. He was offered a peerage by King James II, on condition of converting to Roman Catholicism, but refused, in spite of which he was allowed to retain his commissionerships. In 1685 he was again an MP for Salisbury, and opposed the bill for a standing army supported by the king. During the Glorious Revolution, he maintained an attitude of decent reserve, but on James's flight, he submitted to the new King William III, who confirmed him in his offices. He was again elected for Westminster in 1691 and 1695, for Cricklade in 1698, and finally in 1713 once more for Salisbury. It is his distinction to have founded Royal Hospital Chelsea, to which he contributed £13,000. As a statesman he was second-rate, but as a public servant he creditably discharged all the duties with which he was entrusted. Unlike some other statesmen of his day, he grew rich in the service of the nation without being suspected of corruption or forfeiting the esteem of his contemporaries. Marriages and children Fox married twice: Firstly on 8 December 1651, at the age of 24, to Elizabeth Whittle (died 11 August 1696), a daughter of William Whittle of the City of London, whose mural monument with bust survives in the Ilchester Chapel of Farley Church. His niece Margaret Fox (buried on 22 June 1729), a daughter of his elder brother John, also married a member of the Whittle family. By Elizabeth Whittle he had seven sons, all of whom predeceased him, and three daughters, including: William Fox (1660–1680), eldest son, a captain in the army. A mural monument survives in the north cloister of Westminster Abbey inscribed in Latin and translated as follows: "Near this place, among the ashes of their three brothers Edward, John and Stephen, sleep William and James Fox, sons of the Honorable Sir Stephen Fox, Kt. and Elizabeth his wife.