After the creation of Pakistan, Ali returned from England in April 1948, planning to stay in the country, but his belongings were confiscated and he was expelled by the prime minister Liaqat Ali Khan. In October 1948, Ali left empty-handed. He died on 3 February 1951 in Cambridge "destitute, forlorn and lonely". The funeral expenses of insolvent Ali were covered by Emmanuel College, Cambridge on the instructions of its Master. Ali was buried on 20 February 1951 at Cambridge City Cemetery.