Desalegn said in a televised address to the country, "I see my resignation as vital in the bid to carry out reforms that would lead to sustainable peace and democracy."
The announcement came after the government released hundreds of political prisoners, including some prominent opposition members.
Desalegn, who has sat at the helm of the Ethiopian government since 2012, resigned both as prime minister and chairman of the ruling party "to be part of the efforts to provide a lasting solution to the current situation", Al Jazeera quoted him as saying.
For the past few years, Ethiopia has seethed with social unrest.
Hundreds of people have been killed and thousands have been imprisoned, including top opposition figures.
Demonstrations first spread across the country in 2015 amid calls for political and economic reforms.
Further, widespread demonstrations had broken out earlier this week by the Oromo ethnic group, which is the country's largest ethnic group.
Young men had blocked roads leading out of the capital with rocks and burning tires, disrupting public transportation.
The demonstration came to an end only after the government agreed to release the political prisoners.
While for some people, Desalegn's resignation comes as a "transformational moment"; many see it as a result of an "unprecedented" wave of protests. (ANI)