The resignation came two days after he took oath as the 15th Chief Minister of the state.
People rejected Congress and JD(S) in polls, but they formed "opportunistic alliance" against popular mandate, Yeddyurappa said.
"I am going to resign as chief minister....I will go to Raj Bhavan and submit my resignation. I will not face confidence vote....I am going to resign," he told the Assembly after a brief emotional speech.
Yeddyurappa said he would now "go to the people". His resignation will pave the way for formation of a government led by JD(S) state chief H D Kumaraswamy, who has the backing of the Congress. The newly formed alliance has claimed support of 117 MLAs in the 224-member House with an effective strength of 221.
According to sources, Yeddyurappa had a conversation with party High Command earlier in the day, which asked the Karnataka BJP legislative party leader to tender his resignation if he is unable to manage the majority vote.
Elections held on May 12 to 222 of the state's 224 seats have resulted in a hung assembly with the BJP having 104 MLAs, while the Congress won 78 seats and JD(S) 37. Polling in two seats will be held later.
The Congress-JD(S) combine has claimed the support of 117 MLAs, including one each from the BSP and the KPJP, and one Independent.
The JD(S)'s effective strength will be 36 at the time of voting, as its leader H D Kumaraswamy has won from two seats.
This has reduced the strength of the House to 221 and the BJP will require 111 votes for a simple majority.
Earlier, Congress and JD(S) MLAs who were camping at a hotel in Hyderabad, fearing alleged attempts of poaching by the BJP, came back to the city this morning.
As per the apex court's directions, the police had made massive security arrangements in and around the Vidhana Soudha, the seat of the state legislature, for the smooth conduct of the floor test.
Public entry to the Vidhana Soudha was restricted, and officials and staff of the Secretariat were allowed to enter the premises after thorough checks.
Yeddurappa was sworn in as chief minister on May 17, two days after the results were declared and the governor accepted his claim to form government.
The decision was challenged in the Supreme Court by the Congress and the JD (S) and passing interim orders on their petition, the court yesterday directed that the floor test be conducted today.
Yeddyurappa has asserted that he has "100 per cent confidence" that he would prove his majority in the Assembly.
With the BJP having only 104 MLAs, it remains to be seen how the party will rustle up the numbers and prove majority.
Reports suggested that the BJP has reached out to Congress and JD(S) MLAs, who are unhappy over coming together of their parties for power, to abstain from attending the House today.
The other plan is to ensure that at least seven MLAs cross vote in BJP's favour.
Congress-JD(S) made the legal challenge against Bopaiah's choice as pro-tem speaker contending that the governor's action in appointing "a junior MLA" was "brazenly unconstitutional".
A four-time MLA, Bopaiah was the Karnataka Assembly speaker from 2009 to 2013 and had disqualified 16 MLAs and bailed out the then Yeddyurappa government ahead of a no-confidence vote in 2010.
The Supreme Court in 2011 had quashed Bopaiah's order disqualifying the 16 MLAs ahead of a no confidence motion which had ensured survival of the government.
(With inputs from PTI)