Emily Thornberry said she was resigning from the shadow cabinet as she "will not let anything distract from Labour's chance to win" the next General Election.
Ms Thornberry, who was shadow attorney general, said in a statement: "Earlier today I sent a tweet which has caused offence to some people. That was never my intention and I have apologised.
"However I will not let anything distract from Labour's chance to win the coming General Election.
"I have therefore tonight told Ed Miliband I will resign from the shadow cabinet."
More top news
Protesters demand the government commits to holding local elections on November 24.
New research upends the idea that lichen changed the planet’s atmosphere and paved the way for modern plants.
The flight, conducted mainly for research purposes, lasted 19 hours and 19 minutes.