Sedwill attended Bourne Grammar School in Bourne, Lincolnshire, becoming the Head Boy. He went to the University of St Andrews, where he gained a Bachelor of Science (BSc), and later gained a Master of Philosophy (MPhil) from St Edmund Hall, Oxford.
Sedwill joined the Foreign and Commonwealth Office (FCO) in 1989 and he served in the Security Coordination Department and the Gulf War Emergency Unit until 1991.
He was then posted in Cairo, Egypt, from 1991 to 1994 as a Second Secretary, then First Secretary in Iraq from 1996 to 1997 whilst serving as a United Nations weapons inspector, then in Nicosia, Cyprus, as First Secretary for Political-Military Affairs and Counterterrorism from 1997 to 1999. He was the Private Secretary to the Secretary of State for Foreign and Commonwealth Affairs (Robin Cook and Jack Straw) from 2000 to 2002 in the runup to and preparations for the 2003 Iraq invasion.
He then served as the Deputy High Commissioner to Pakistan, based in Islamabad from 2003 to 2005, then the Deputy Director for the Middle East and North Africa Department of the Foreign Office. From 2006 to 2008, he served as International Director of the UK Border Agency.
In April 2009, Sedwill became the Ambassador to Afghanistan, succeeding Sir Sherard Cowper-Coles. In January 2010, he was additionally appointed as NATO's Senior Civilian Representative in Afghanistan, to be the civilian counterpart to the ISAF Commander, U.S. General Stanley A. McChrystal and then U.S. General David H. Petraeus. He was succeeded as ambassador temporarily by his predecessor, Sir Sherard Cowper-Coles, and then by Sir William Patey, formerly British Ambassador to Saudi Arabia.
In May 2011, Sedwill took over as the FCO's Director-General for Afghanistan and Pakistan (and thus as the UK's Special Representative for Afghanistan and Pakistan) from Karen Pierce . He additionally became the FCO's Director-General, Political in Autumn 2012, replacing Sir Geoffrey Adams.
On 9 January 2013, it was announced that Sedwill was to become the next Permanent Secretary at the Home Office filling the vacancy left by Dame Helen Ghosh from 1 February 2013. As of 2015, Sedwill was paid a salary of between £180,000 and £184,999, making him one of the 328 most highly paid people in the British public sector at that time.
On 27 February 2017, it was announced that Sedwill is to replace Sir Mark Lyall Grant as National Security Adviser in the Cabinet Office from April.
Sedwill married in 1999 and has one daughter. He was appointed a Companion of the Order of St Michael and St George (CMG) in 2008. He is a Fellow of the Royal Geographical Society (FRGS) and a Fellow of the Institute of Directors (FIoD).