He was born in London and studied at Pembroke College, Cambridge.
He was for many years a reader in history at Royal Holloway, University of London, specialising in the Tudor and Stuart periods. His books include biographies of James I and George Villiers, 1st Duke of Buckingham.
On 21 December 2005, Lockyer entered into a civil partnership with Percy Stevens, his life partner of 39 years, at the registry office in Westminster. On 26 June 2014 they were among the first couples to legally convert their civil partnership into a marriage.
He died on 28 October 2017 at the age of 89.
- Tudor and Stuart Britain, 3rd edition, London 2004, Pearson.
- James VI and I, 2nd edition, London, 1998, Longman.
- The Early Stuarts: The Political History of England 1603-1642, London, 1999, Longman.
- Buckingham, the Life and Political Career of George Villiers, First Duke of Buckingham, 1592-1628, London 1981, Longman.
- Alice Hutton, "Obituary: Roger Lockyer", BBC News, 4 November 2017.
- Dominic Casciani, "39 years of waiting" BBC News, 5 December 2005.
- Dominic Casciani, "Together nearly 49 years – married at last after civil partnership conversion" The Guardian, 10 December 2014.