Republicans will take control of the chamber in January after securing a narrow majority on Wednesday. Democrats remain in control of the Senate.
"For me, the hour has come for a new generation to lead the Democratic caucus that I so deeply respect," said Pelosi, 82, who first became speaker in 2007 and later presided over both impeachments of Donald Trump.
"I will not seek re-election to Democratic leadership in the next Congress," the California Democrat told lawmakers in a speech on the House floor.
Pelosi's departure as party leader will mark the end of an era in Washington.
Elected to Congress in 1987, she first became speaker in 2007. Known for keeping a tight grip on party ranks, she presided over both impeachments of Donald Trump during her second stint in the role.
Currently second in the line of succession to President Joe Biden after the vice president, Pelosi said last week that her decision on the future would be influenced by the brutal attack on her elderly husband in the run-up to the November 8 midterms.
Paul Pelosi, who is also 82, was left hospitalised with serious injuries after an intruder – possibly looking for the speaker – broke into their San Francisco home and attacked him with a hammer.
Life after the midterms
Pelosi said she would continue to represent her San Francisco district in the next Congress and praised Democrats' better-than-expected performance in the midterm contest.
"Last week, the American people spoke and their voices were raised in defence of liberty, of the rule of law and of democracy itself," she said. "The people stood in the breach and repelled the assault on democracy."
In a statement earlier in the week, she said "House Democrats will continue to play a leading role in supporting President Biden's agenda – with strong leverage over a scant Republican majority."
With inflation surging and Biden's popularity ratings cratering, Republicans had hoped to seize control of both houses to block most of Biden's legislative plans.
But instead, Democratic and independent voters – galvanised by the Supreme Court's overturning of abortion rights and wary of Trump-endorsed candidates who openly rejected the result of the 2020 presidential election – turned out in force.
And Republicans lost ground with candidates rejected by voters as too extreme.
Biden's party secured an unassailable majority in the upper chamber with 50 seats plus Vice President Kamala Harris's tie-breaking vote and a December Senate run-off in Georgia could yet see the Democrats improve their majority to 51 in the upper house.
The Senate oversees the confirmation of federal judges and cabinet members, and having the 100-seat body in his corner will be a major boon for Biden.
(FRANCE 24 with AFP and Reuters)