Ban congratulated Hariri on the swift process and "encourages Lebanon's political leaders to build on the momentum of national unity," according to a statement released by his spokesperson.
Ban voiced hope that the new government would ensure a successful holding of the country's forthcoming parliamentary election within the time frame set by the constitution.
Hariri, who is the son of late Prime Minister Rafiq Hariri, served as prime minister between 2009 and 2011 and is currently a member of parliament.
Lebanon was in a political deadlock since the end of the six-year term of former President Michel Suleiman on May 25, 2014.
Hariri launched an initiative which led to the election of President Michel Aoun as the 13th president of Lebanon on Oct. 31, ending more than two and half years of political vacuum.
Lebanon is due to hold parliamentary elections next May.
XINHUA/MNA