President Bidya Devi Bhandari administered the oath of office and secrecy to 65-year-old Oli at a function held at Presidents Office, Shital Niwas, in Maharajgunj.
He is the 41st prime minister of Nepal.
Known for his pro-China stance, Oli had served as the country's prime minister from October 11, 2015 to August 3, 2016.
His PM candidacy was supported by the UCPN-Maoists, Rastriya Prajatantra Party Nepal, and Madhesi Rights Forum-Democratic along with 13 other small parties.
Also Read
Deuba was elected as the 40th Prime Minister on June 6 with the support from CPN (Maoist Centre) which is now a part of Left alliance and opting for merger with CPN-UML.
"The elections of three tiers of government have been successfully held under my leadership setting the foundation to long transition," Deuba said in the television address.
The Left alliance of the CPN-UML, led by Oli and CPN-Maoist Centre, led by Prachanda, secured almost two third majority in the Parliament during the parliamentary elections.
The total strength of the CPN-UML and CPN-Maoist Centre was 174, sufficient to form a majority government at the Centre.
The Madhesi parties - Rastriya Janta Party Nepal has got 17 seats and Federal Socialist Party Nepal secured 16 seats in the Parliamentary elections.
The elections were seen as the final step in Nepal's transition to a federal democracy following a decade-long civil war till 2006 that claimed more than 16,000 lives.
Following the adoption of the new Constitution, the ethnic Madhesi group, mostly of Indian-origin, protested for months, saying they were not getting enough territory in one of the provinces and were also facing discrimination.
The polls are said to be a step forward in cementing democracy and providing political stability to Nepal, which has seen 10 prime ministers in as many years.
Oli had served as deputy prime minister during the then interim government led by Girija Prasad Koirala in 2006 after the successful conclusion of the second Peoples Movement. He was elected as a member of Parliament in the House of Representatives for the first time from Jhapa district in 1991.
Disclaimer: No Business Standard Journalist was involved in creation of this content