He was the chief of staff of the Bangladesh Army during the assassination of then president Sheikh Mujibur Rahman. During the assassination, he was kept in the dark about the plot, intelligence failed and he could not save the President. Dismissed from the position on 25 August 1975 by the following Mushtaq government, he retired from the army. He was succeeded by Ziaur Rahman as army Chief. Suspecting his intentions based on his loyalty towards Bangabandhu Sheikh Mujibur Rahman, General Shafiullah was sent overseas with an ambassadorial post, along with fellow Bangladesh Air Force Chief of Air Staff Air Vice Marshal A. K. Khandker. He was elected as an Awami League Member of Parliament in 1996.