Koirala's decision to step down comes amid mounting criticisms from the Maoists that the veteran politician was unwilling to hand power to them even after his party lost the elections in April.
Koirala, 83, became prime minister in April 2006 after weeks of street protests forced the then King Gyanendra to end his brief absolute rule and hand power to political parties.
This prompted the Maoists to declare a ceasefire and join a peace process with the government.
Koirala was the chief architect of a 2006 peace deal that brought the Maoists into political mainstream.
He has been elected to the special assembly but it is unclear what position he will hold under the new government led by the Maoists.
Some analysts say Koirala has been negotiating with Maoists for the ceremonial position of president, after the country abolished its 239-year-old monarchy and became a republic.
But the Maoists have refused any such role for Koirala.
Koirala's centrist Nepali Congress party is the second biggest group in the assembly.
The Maoists won 220 seats in the 601-member assembly to become the biggest group but they are still negotiating with other political parties to form the government.
Party officials say the Maoists are expected to form a new government next week, after the election of the first president by the assembly.