He was sentenced by an Egyptian court.
He is the first former leader to be tried in person since the start of the Arab Spring in early 2011.
Former Interior Minister Habib al-Adly also got a life sentence, but the acquittal of his four senior security officials had sparked fury.
Mubarak and his two sons were also acquitted on separate charges of corruption.
Shouting and scuffles erupted in court after the verdict was read out.
But 84-year-old Mubarak suffered a “health crisis” as he was being transferred to the hospital of Tora prison near Cairo, Egyptian state TV reported.