Her departure, following a series of clashes with Labour leader Jeremy Corbyn, will trigger a by-election in the south London constituency of Lewisham East, where she had a 21,123-vote majority at the general election last year.
The announcement followed fresh speculation about the Labour leader’s future, with one of his closest supporters openly suggesting Mr Corbyn could be replaced within six months.
Senior Tories have seized on her resignation as fresh evidence of division in Labour ranks.
Conservative Party chairman Brandon Lewis said: “After a dismal set of local election results in which Labour failed to make the gains they boasted about, this is more proof that Labour are too divided to deliver on their promises to working people.
“This also highlights a complete lack of faith in Jeremy Corbyn and his leadership.
“The remaining moderates left within Labour will now rightly be concerned that they are next on Momentum’s list.”
Ms Alexander, 43, quit yesterday to become deputy mayor for transport at London’s City Hall.
The former shadow health secretary, who joined the Commons in 2010, was the first MP to walk away from the Labour frontbench during an attempt to force Mr Corbyn out of the party leadership in 2016.
She said at the time that she “hated” being in the “entirely dysfunctional” shadow cabinet.
Following her resignation from the frontbench, she said: “I hated being part of something so inept, so unprofessional, so shoddy. This wasn’t that I had gone into politics to do. I was a joke.”
Party insiders say she has faced repeated criticism from Left-wing supporters of the Labour leader for her stance.
She said yesterday: “After eight years as the Member of Parliament for Lewisham East and six years as a local councillor, I know just how important it is we ensure everyone has access to a high-quality and affordable public transport network, with safe cycling routes across the capital.
“London is a fantastic city. I know Sadiq wants its transport system to be the envy of the world and I am looking forward to playing my part in making that happen.”
A statement from Mr Corbyn’s office said: “I would like to thank Heidi Alexander for her service to the people of Lewisham as their MP for the past eight years, and for her work as shadow health secretary.
“I wish Heidi well in her new role as deputy mayor for London in Sadiq Khan’s team, where I know she will put her talents and knowledge to great use for the people of London.”
Earlier, the founder of the hard-Left Momentum organisation that backs Mr Corbyn yesterday openly discussed a change of leadership in the Labour Party.
In an interview on the political news website Politico, Left-wing activist Jon Lansman said Momentum had to be ready to find a replacement for Mr Corbyn, who will be 72 by the time the next general election is due in 2022.
“Over time, Jeremy will eventually go and if we survive we have to work out a new way of living without the same kind of commitment to the current leader,” Mr Lansman said.
He said Momentum wanted to overhaul the party’s management structures before a new leader was put in place.
“We want to make sure it’s democratic before he [Corbyn] goes,” Lansman says.
“He’s of an age where he is incredibly fit and well today but who knows if he will be in six months’ time. You cannot predict your health.”