In a letter to the prime minister, Sedwill wrote that it was the right time for him to move on as the government progresses to its next phase of their recovery plan.
He wrote: "Two years ago, when my predecessor fell ill, your predecessor asked me to step in as Cabinet Secretary, and you asked me to continue to support you through Brexit and the election period.
"It was obviously right to stay on for the acute phase of the Covid-19 crisis. As you are setting out this week, the government's focus is now shifting to domestic and global recovery and renewal."
His departure follows reports of tensions between Sedwill and senior members of the prime ministers’ team.
The FDA, the union for senior civil servants, said that Sedwill had been undermined in a “cowardly” way.
General Secretary of the FDA, Dave Penman, said that unnamed officials in Downing Street had been briefing against Sedwill, adding that: "Not only is it a self-defeating and corrosive tactic, it's also a cowardly one, safe in the knowledge that those who are briefed against are unable to publicly respond."
He concluded that the government would be "weaker as a result" of Sedwill’s departure.
Sedwill’s additional role as national security adviser will be taken on by David Frost, Boris Johnson’s chief Brexit adviser.
Dominic Cummings, considered to be among the prime ministers most influential advisers, has called for an overhaul of the civil service for a long time.
Following his departure from his current role, Sedwill will be made a peer and will chair a panel on global economic security as the UK assumes the presidency of the G7.