Sawyer was elected MP for High Wycombe in 1673 and was knighted four years later.[2] 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.
He died at Highclere on 30 July 1692 and was buried in the old church there. He had married Margaret Suckeley and had one daughter, Margaret Sawyer, who married Thomas Herbert, 8th Earl of Pembroke. Their descendants the Earls of Carnarvon eventually inherited Highclere Castle. He also had a son George, and through George's daughter Catherine was ancestor of the Marquess of Anglesey.