Prachanda, 62, announced his resignation while addressing the nation in a live telecast. It was his second stint as the prime minister.
He was elected as the 39th prime minister of Nepal after forging alliance with the Nepali Congress on August 3, 2016.
Prachanda, the chairman of Communist Party of Nepal-Maoist Centre, had reached an understanding with Nepali Congress President Sher Bahadur Deuba that he would step down as prime minister and hand over the leadership to him after nine months.
The pact was to run the government on a rotational basis until elections to the parliament are held in February 2018.
Prachanda was to hold office till local polls are held and remaining two elections -- provincial and central -- were to be conducted under Deuba.
Millions of Nepalese on May 14 voted in the country's first local-level polls in two decades as the Himalayan nation took a crucial step towards cementing democracy amid political turmoil.
Local-level elections could not be held after 1997 largely as a result of the decade-long Maoist insurgency that claimed more than 16,000 lives in Nepal.
The elections should be held in every five years but due to the political instability, they were halted since May 1997.
What we need to learn from Nepal and Sri Lanka
Nepal joins China's 'One Belt One Road' initiative
Nepal bans new Indian Rs 500 and Rs 2,000 notes
Nepali woman scales Mount Everest with anti-trafficking message
Prez performs special puja at Pashupatinath temple