Pelosi, elected to a 12th House term representing San Francisco, was well ahead in early returns from absentee ballots.
Sheehan became famous for camping outside President Bush's Texas ranch to demand an end to the war in Iraq after the death of her son, Casey. She accused Pelosi of failing to end the war and not allowing impeachment hearings against President Bush and Vice President Dick Cheney.
In a statement after polls closed, Sheehan didn't concede defeat but vowed to run again in 2010. She accused the media of ignoring her and criticized Pelosi for not debating her.
"Just avoiding a debate shows a lot of disrespect for my campaign," she said.
"We tried very hard to get our message out, but it is very hard when the media does not listen to your message."
Pelosi, who has easily fended off past challenges from the left, said she respected Sheehan's right to run. But for the most part she ignored her during the campaign.
Also on the ballot were Republican Dana Walsh and Libertarian Philip Z. Berg.