The prime minister had faced mounting pressure from within his own party to resign and it had become clear that he would have been humiliated had he stood in the September ballot, the BBC's Wyre Davies reports from Jerusalem.
Many analysts say Mr Olmert's weak political position has severely impaired chances for a peace deal with the Palestinians by the end of the year, our correspondent adds.
A spokesman for Palestinian President Mahmoud Abbas said the announcement was "an internal Israeli matter" and that Palestinian negotiators still hoped to reach a peace settlement before the end of this year.
The US state department said that peace negotiations would continue and that it looked forward to "working with all responsible Israeli leaders in the government".
Syria's UN ambassador said the resignation might affect indirect peace talks with Israel, which are being brokered by Turkey.
"It could do. I hope not," said Bashar Ja'afari told Reuters news agency.
The scandal is one of six corruption investigations Mr Olmert has faced during his time in office.
EHUD OLMERT'S POLITICAL LIFE
1993: Begins 10-year stint as mayor of Jerusalem
2005: Leaves right-wing Likud party with former Prime Minister Ariel Sharon to form Kadima
2006: Takes over as leader when Ariel Sharon suffers a stroke
2007: Helps relaunch Israeli-Palestinian peace talks after seven-year hiatus
2008: Announces plans to resign
Mr Olmert said he felt able to continue carrying out his duties despite the corruption investigation but he asked:
"What is more important, my personal justice or the public interest?"
Noting that the investigation was turning people against him, he said that "people hurting my family bothers me a lot".
He complained of "relentless attacks from self-appointed 'fighters for justice' who sought to depose me from my position, when the ends sanctified all the means".
The Israeli prime minister also seemed to direct veiled criticisms against the justice system, saying "the prime minister is not above the law but he is in no way below it".
"I am proud to be the prime minister of a country that investigates its prime ministers," he remarked.
Foreign Minister Tzipi Livni, one of Israel's most popular politicians, is tipped to replace Mr Olmert in the party contest.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.