Ypi's parents were Asilan (a landowner) and Zavalani.
He was educated at a university in Istanbul.
In 1920-1921 he was Minister of Internal Affairs and Minister of Justice. He also held the position of Minister of Public Instruction.
As the leader of the Popular Party, in late December 1921 he formed a government where Fan S. Noli was the Minister of Foreign Affairs and Ahmed Zogu was the Minister of Internal Affairs. Until December 4, 1922, Ypi was Prime Minister, in 1922 after Noli's resignation he was also acting Minister of Foreign Affairs.
From December 2, 1922, to January 31, 1925, Ypi was a member of the High Council (the collegial Head of State, formally for William of Wied). In June 1924 he left Albania because of Noli's revolt, but he kept holding the post formally.
During Zog's Kingdom, Ypi was Chief Inspector of the Royal Court.
When the Italian occupation began, Ypi saluted the Italians who had "liberated" Albania "from the heavy slavery of the sanguinary Zogu". After King Zog had fled, from April 9 to April 12 Ypi was Chairman and Plenipotentiary for Justice of the Provisional Administration Committee, and as such acting head of state. From April 12, he was the Minister of Justice in Shefqet Verlaci's government. He was killed by an aerial bomb.