Shaffer was born to a Jewish family in Liverpool, the son of Reka (née Fredman) and Jack Shaffer, an estate agent.[2][3] He is the twin brother of fellow playwright, Anthony Shaffer.
He was educated at the Hall School, Hampstead and St Paul's School, London and subsequently he gained a scholarship to Trinity College, Cambridge, to study history. Shaffer was a Bevin Boy coal miner during World War II, and took a number of jobs including bookstore clerk, and assistant at the New York Public Library, before discovering his dramatic talents.