Sawyer was elected MP for High Wycombe in 1673 and was knighted four years later. He was elected speaker in 1678, but had to resign in under a month because of health problems. Three years later he was made attorney-general. Sir Robert prosecuted members of the Rye House Plot and also Titus Oates. He returned to private practice, and scored a great triumph as defence counsel in the Trial of the Seven Bishops
Sawyer settled at Highclere in Hampshire where he built the house that preceded the present castle. He died on 30 July 1692 and was buried in the old church there.
He married Margaret Suckeley and their daughter Margaret Sawyer married Thomas Herbert, 8th Earl of Pembroke. Their descendants the Earls of Carnarvon eventually inherited Highclere. He also had a son George, and through George's daughter Catherine was ancestor of the Marquess of Anglesey.