Omar Suleiman said Mr Mubarak, who earlier left Cairo for Sharm el-Sheikh, has handed control to the military.
Car horns were heard around the capital in celebration following the announcement.
Crowds in Cairo's Tahrir Square chanted: "The people have brought down the regime."
"In these grave circumstances that the country is passing through, President Hosni Mubarak has decided to leave his position as president of the republic," Mr Suleiman said. "He has mandated the Armed Forces Supreme Council to run the state. God is our protector and succor."
Mohammed ElBaradei, one of Egypt's key opposition leaders, said: "This is the greatest day of my life.
After 30 years of power, amidst 18 days of protest, Hosni Mubarak has finally stepped down and handed power to the Military. This is so far the second instance of the ousting of an Arab leader in the Middle East in recent months.
But as with Tunisia, the same questions still remain, 'what happens next?'
The next stage is as tenuous, as we continue to look on and see what the outcome of Mubarak's departure will be, hoping that the Military will help the transition to a fair, democratic rule led only by the Egyptians.
The Power of Protest has been realised. But Those Who Fought, did not do so in vain. Hope for ALL remains and is strengthened.
*YOU Can make Change*
http://www.youtube.com/watch?v=hLCFiFrpArE << no crisis in Cairo.