Later this week, Dr Nabil El-Araby, the current Foreign Minister of Egypt will take up the position of Secretary General of the Arab League. Dr El-Araby was appointed Foreign Minister in the interim government of Egypt after the fall of the Hosni Mubarak and he was elected to be head of the Arab League in May (see here). Dr El-Araby was a Judge at the International Court of Justice from 2001 to 2006 where he completed the term of Algerian Judge (and former ICJ President) Mohammed Bedjaoui. As far as I know Dr El-Araby will be the first ICJ judge to go on to be head of an international organization. Many ICJ judges (Judge El-Araby included) have distinguished careers in government before being elected to the Court, however, I think it is rare for ICJ judges to go back into national governments and I am not aware of any going on head an international organization. Apparently, the reverse situation, i.e going from head of an international organization to ICJ Judge nearly happened in the mid 1990s. Madeleine Albright, former US Secretary of State and former US permanent representative to the UN, recounts in her memoirs how the United States opposed the reelection of Boutros Boutros Ghali as Secretary General of the United Nations but told him that they would support him for the ICJ.
Incidentally, Dr El-Araby is one of a number of high profile Egyptian international lawyers/diplomats/international civil servants. Boutros Boutros Ghali is another one, as is Dr Mohammed El Baradei, former Director General of the International Atomic Energy Agency (and potential candidate for the Egyptian presidency in the forthcoming elections). All three have doctorates in international law (El-Araby and El Baradei from New York University Law School and Boutros Ghali from Paris) and Boutros Ghali and El Baradei have taught international law. Outgoing Arab League Secretary General Amr Moussa (and another potential candidate for the Egyptian presidency) is another promiment Egyptian diplomat/international civil servant who started out as a lawyer though he is not as prominent an international lawyer as the others.