The ex-international development secretary expressed his “sadness” over his decision to quit as a Tory MP for Penrith and the Border, just three months after he led a surprise bid to lead the party.
In a dramatic move, Mr Stewart then announced his intention to challenge Sadiq Khan for the mayoralty, when London goes to the polls next year.
He called for an end to the “suffocating embrace of our dying party politics” and vowed to defy the “mutual insults ... lazy habits, half-baked ideas and pointless compromises” of the current system.
Mr Stewart promised Londoners he would start a walking tour of all 32 boroughs to meet people and listen to their concerns.
Private polling for his campaign suggested he was already in joint second place with Shaun Bailey, the Tory candidate, behind the incumbent, Mr Khan, according to the Evening Standard.
He became the second leadership contender to leave the party after no-deal Brexit rebel Sam Gyimah defected to the Liberal Democrats last month.
His departure was branded as the “last rites” for moderate Conservativism under Boris Johnson, and comes in the wake of high-profile resignations by Amber Rudd and Ruth Davidson, the former Scottish Tory leader.
Mr Stewart was seen by some as the break-out star of the leadership race, winning support with his unconventional campaign style, where he took to the streets to meet the public for a social-media bid dubbed “RoryWalks”.
A firm opponent of a no-deal Brexit, Mr Stewart was among the 21 Tory rebels who supported a bid to seize control of the Commons timetable to pass a law preventing the prime minister from crashing the UK out of the EU.
The PM retaliated by sacking all the rebels, which saw two former chancellors stripped of the Conservative whip.
Mr Stewart announced his decision to quit on Twitter, saying it had been a “great privilege” to serve Penrith and the Border for the past decade and expressed his “sadness that I am announcing that I will be standing down at the next election, and that I have also resigned from the Conservative party.’’
Writing in The Cumberland and Westmorland Herald, Mr Stewart said: “As you will be aware, I am no longer allowed to run as Conservative MP in Penrith and The Border.
“Because I have loved the constituency so much, I had considered standing as an independent; but I have decided that I wouldn’t want to run against those Conservative members who have been such wonderful colleagues over the last 10 years.
“I am hugely grateful to all the members of my local party who have written in support, and to the chair and president of my local party, who have resigned from the Conservative Party in support of my position.
“But it should be no secret that there are also local party members who would rather I did not run again. I don’t want to test loyalties, destroy old friendships or push any of these issues any further.”
Robert Craig, president of the Penrith and the Border Conservative Association, said Mr Stewart would “possibly” not have made the decision if he still had the Tory whip.
“I suppose had that changed ... it seems to have become clear that that wasn’t going to change and he has other ambitions.”
Mr Craig praised Mr Stewart as an “inspirational” MP who managed to attract a broad church of followers and criticised Mr Johnson for taking the party in an “extreme” direction.
Ms Rudd, a former cabinet minister who also quit the party in protest, led tributes to her former colleague.
She said: “What a loss to politics. An outstanding MP and minister. One of the strongest speakers in parliament.
“Principled, patient, thoughtful. I feel certain he’ll be back.”
Former Tory MP Nick Boles, who resigned from the Conservatives earlier this year, tweeted: “Last rites are being read for moderate one nation conservatism.
“Rory Stewart joins Ruth Davidson, Sam Gyimah, Amber Rudd and many others.
“A sad day for British politics but a personal liberation for Rory who will go on to greater things, no doubt.”
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies