Mr Thaksin said he was stepping down out of respect for the king Thailand's embattled Prime Minister Thaksin Shinawatra says he is stepping down, and has urged Thais to re-unite after months of political crisis.
Speaking on national TV, he said he would remain a caretaker prime minister until a new premier was chosen.
Monday saw Mr Thaksin claim 57% of the vote in Sunday's snap election, which he called in a bid to end the crisis.
His opponents, who accuse him of abuse of power and corruption, had threatened fresh street protests unless he quit.
Mr Thaksin's televised news conference came after he met the country's revered King Bhumibol Adulyadej.
This is our victory. If we had not helped each other [in the protests], today would not have happened Chamlong Srimuang Protest leader
He said he was "sorry" he would not be accepting the post of prime minister when the post-election parliament convened.
But he said he would remain a caretaker prime minister "until the selection process for the next prime minister is complete".
He apologised to the 16 million people who voted from him on Sunday, but said he had made the decision out of respect for the king, who marks his 60th anniversary on the throne this year.
"I decided that the unity of the country is the most important thing for Thailand," he said.
Protest leaders - who earlier on Tuesday said they would call off fresh demonstrations if Mr Thaksin resigned - welcomed the announcement.
"This is our victory. If we had not helped each other [in the protests], today would not have happened," Chamlong Srimuang, Mr Thaksin's one-time political mentor, said.
THAKSIN'S POLITICAL CRISIS
23 January: Thaksin sells 49.6% family stake in telecoms company Shin Corp
4 February: 50,000 attend rally in Bangkok demanding Thaksin's resignation; similar rallies continue in the capital
24 February: Thaksin dissolves parliament and calls snap election
27 February: Three main opposition parties say they will boycott the polls
2 April: Thais vote for new government amid opposition boycott
3 April: Thaksin says his Thai Rak Thai party has won more than 50% of vote
4 April: Thaksin says he will step down
But while on the surface the prime minister's announcement looks like a victory for the protesters, the crisis may be far from over, the BBC's Jill McGivering says.
Mr Thaksin's party will still dominate any new parliament, and he will have a large say in who succeeds him, with some fearing the new prime minister could be a Thaksin protege, giving him a sort of leadership by proxy, our correspondent adds.
It is not yet known when parliament will convene as by-elections in 38 constituencies must be held after candidates failed to get the 20% of votes needed to claim victory.
On Monday, election officials said they would carry out the by-elections within 30 days so parliament can convene, with all seats filled, as required under the constitution.
Mr Thaksin's announcement was unexpected, as it came a day after he claimed an election victory, saying his Thai Rak Thai party had won 57% of the vote. P>But he acknowledged that his share of the vote had dropped, from 19 million in last year's election to 16 million.
Thai opposition activist reacts to TV speech by Prime Minister Thaksin Shinawatra Mr Thaksin faced opposition both in parliament and on the streets
He proposed setting up an independent committee to investigate a way out of the crisis - adding that he would step down if they asked him to - but it was rejected by his opponents.
Before the election, Mr Thaksin said he would step down if he failed to get more than half of the votes.
Opposition parties boycotted the poll, and there were signs of a large protest vote, particularly in Bangkok and in the south of the country.
Mr Thaksin has been under increasing pressure following his family's decision in January to sell its shares in one of Thailand's biggest telecom groups, Shin Corp, which netted them and others $1.9bn.
The move angered many urban Thais - already discontented over his perceived brash, authoritarian style of leadership - who took to the streets in protest, complaining that the prime minister's family had avoided paying tax and passed control of an important national asset to Singaporean investors.