The corporation has confirmed that Bashir, 58, one of the BBC’s most respected journalists known for interviewing Diana and the late pop star Michael Jackson among many others had left his position.
It said he left his role of religion editor, which he has held since 2016, due to ongoing health issues.
Last year, it was confirmed Bashir had contracted Covid and was “seriously unwell.”
He also underwent quadruple bypass surgery in 2020.
The deputy director of BBC News, Jonathan Munro, said: "Martin Bashir has stepped down from his position as the BBC’s Religion Editor, and is leaving the corporation.
"He let us know of his decision last month, just before being readmitted to hospital for another surgical procedure on his heart. Although he underwent major surgery toward the end of last year, he is facing some ongoing issues and has decided to focus on his health."
He added: "We wish him a complete and speedy recovery."
However, his departure comes after questions were raised about how Bashir secured his interview with the Princess of Wales in 1995.
During the interview, which has been watched millions of times, Diana spoke of Prince Charles’s relationship with Camilla Parker-Bowles. She also admitted to having an affair.
"There were three of us in this marriage, so it was a bit crowded," she told Bashir on Panorama.
Bashir was criticised when it emerged that mocked-up bank statements had been produced in an attempt to secure the interview with the princess.
Retired Supreme Court judge Lord Dyson is leading a BBC internal inquiry into the incident - but Bashir will not face a criminal prosecution.
It was confirmed today that Lord Dyson’s investigation into how Bashir landed the Panorama interview with the Princess of Wales has concluded.
The former master of the rolls and head of civil justice was appointed to look into the circumstances surrounding the explosive 1995 interview, which famously featured Diana saying: “Well, there were three of us in this marriage, so it was a bit crowded.”
A spokeswoman for Lord Dyson said: “Lord Dyson has concluded his investigation and the report has been passed to the BBC for publication in due course.”
A BBC spokesman said the report would be published “very soon”.
The princess’ son the Duke of Cambridge welcomed the launch of the investigation late last year, saying it “should help establish the truth behind the actions” that led to the programme.