Oli defeated his rival Madhav Kumar Nepal, a former prime minister and senior leader of the party by a margin of 44 votes.
Ishwor Pokharel has been elected general secretary of the party. He defeated former finance minister and senior leader Surendra Pandey.
However, Oli and Nepal both got seven members each elected during the voting.
The party will form a 149-member Central Committee with both elected and nominated members and executive office bearers.
CPN-UML secured second position in the last year's Constituent Assembly election behind Nepali Congress, pushing the Unified CPN-Maoist to the third position.
Meanwhile, Prime Minister Narendra Modi and BJP President Amit Shah have also congratulated Oli.
Nepal Prime Minister Sushil Koirala, who is currently undergoing medical treatment in the US, also telephoned Oli to congratulate him.