Koirala, 74, the sole contestant in the race for premiership, was elected with 405 votes in favour in the 601-member Constituent Assembly.
As many as 148 lawmakers from UCPN-Maoist, Rastriya Prajatantra Party-Nepal and some small parties in the Maoist-led alliance voted against Koirala. To become premier more than 50 per cent votes are required under the interim Constitution.
After the voting, Parliament Speaker Surya Bahadur Thapa amid applause declared that Koirala had secured majority.
Born in Biratnagar in eastern Nepal, Koirala acquired the membership of the Nepali Congress (NC) party in 1955. He is former Prime Minister Girija Prasad Koirala's cousin and is known for his simple life style and ideal thought. He served six years in prison on different occasions in Nepal and India. Koirala, who became the country's sixth Prime Minister since monarchy was abolished in May 2008, went to India in 1960 after the then king suspended democracy and jailed dozens, including his relatives. He stayed there for 16 years in self-exile.
Koirala, in his address to the Legislative Parliament, expressed commitment to promulgate the new constitution within a year. He also called for consensus, collaboration and cooperation among all political parties to draft the Constitution.
"We also expect assistance from our neighbours India and China as well as other friends to complete our responsibilities," he said. Koirala is scheduled to be sworn in by the president later today.
He is also expected to announce a small cabinet and continue negotiations with other political parties to join his coalition government. No party could secure a majority in last year's Constituent Assembly polls.
The standing committee of the CPN-UML - the second largest party which has 173 lawmakers - backed Koirala for the top post after the party reached a six-point deal with the NC, which has 194 lawmakers.
The two largest parties in the Constituent Assembly inked the deal yesterday after several rounds of negotiations on the issue of power sharing.