Trump blamed the decision for opening the door to the appointment of Special Counsel Robert Mueller, who took over the Russia investigation and began examining whether Trump's hectoring of Sessions was part of a broader effort to obstruct justice.
In a letter to Trump, Sessions wrote he had been "honoured to serve as Attorney-General" and had "worked to implement the law enforcement agenda based on the rule of law that formed a central part of your campaign for the presidency."
"We thank Attorney-General Jeff Sessions for his service, and wish him well!" Trump tweeted. "A permanent replacement will be nominated at a later date."
Despite the tension with the White House, Sessions had described the position of top law enforcement officer as his dream job and he pursued his conservative agenda with gusto. But he also had to live with sometimes humiliating attacks from a President he couldn't seem to please and the suspicions of career staff members who feared the politicisation of a Justice Department that prides itself on its independence.
Department veterans have expressed concerns that Trump's repeated public attacks on Sessions, the Justice Department and the FBI could cause lasting damage to federal law enforcement.
Sessions, 71, was the first US senator to endorse Trump, and in many ways he had been the biggest supporter of the President's policies on immigration, crime and law enforcement.
But all of those areas of agreement were overshadowed by the Russia investigation — specifically, Sessions's recusal from the inquiry after it was revealed that he had met more than once with the Russian ambassador to the United States during the 2016 campaign even though he had said during his confirmation hearing that he had not met with any Russians.
Trump has never forgiven Sessions for that decision, which he regarded as an act of disloyalty that denied him the protection he thought he deserved from his attorney-general. "I don't have an attorney-general," he said in September.
Privately, Trump has derided Sessions as "Mr Magoo," a cartoon character who is elderly, myopic and bumbling, according to people with whom he has spoken.
Trump also had repeatedly threatened or demanded Sessions's ouster behind closed doors, only to be convinced by aides that removing him could provoke a political crisis within the Republican Party, where many conservatives stayed loyal to the former senator. In recent months, however, some of those allies had signalled a willingness to tolerate Sessions' removal after the Midterm election.
Democrats have moved gingerly around Sessions — fearful that if he were driven from office, his replacement could curtail the Russia investigation led by Special Counsel Robert Mueller.
A person close to Sessions, said the Attorney-General shared the President's frustration with the pace of the Russia inquiry, and wished that it had been completed. But Sessions also thought that by staying in the job, he had protected the integrity of the investigation, the person said.
In the long run, Sessions is convinced that the country will be better served by the investigation proceeding naturally, as the findings will be more credible to the American public, the person said.
Mueller is looking into Trump's statements seeking to fire Sessions or force his resignation in an effort to determine whether those acts are part of a pattern of attempted obstruction of justice, according to people close to the investigation.
Earlier this year, Mueller's team questioned witnesses about Trump's private comments and state of mind in late July and early August of last year, around the time he belittled his "beleaguered" Attorney-General on Twitter, these people said. The questions sought to determine whether the President's goal was to oust Sessions so he could replace him with someone who would take control of the investigation, these people said.
The Mueller inquiry is overseen by Deputy Attorney-General Rod Rosenstein, who also has had strained relations with Trump, but is considered safe in his position for the moment.
Sessions usually does not respond to the President's criticism, but he has at times pushed back.
After one particularly blistering tweet in February, in which the President said Sessions's actions were "DISGRACEFUL!" he issued a statement: "As long as I am the Attorney General, I will continue to discharge my duties with integrity and honour, and this Department will continue to do its work in a fair and impartial manner according to the law and Constitution.''
- Washington Post, AP