Stepanov returned to the Naval Academy in April 1947, serving as head of its Organization and Mobilization Department until November 1947. On 12 January 1948 Stepanov, with fellow naval officers Nikolay Kuznetsov, Lev Galler and Vladimir Alafuzov were brought before the of the Ministry of the Armed Forces of the USSR, chaired by Marshal Leonid Govorov. They were accused of having passed technical secrets to Britain and the United States during the war years. Found guilty by the court, the verdict was passed to the Military Collegium of the Supreme Court of the Soviet Union, which on 3 February 1948 convicted them of the charges. Stepanov was sentenced to 10 years in prison, and on 10 February 1948 his rank of vice-admiral was revoked by the Council of Ministers of the Soviet Union. On 13 May 1953, shortly after the death of Stalin, Stepanov was fully rehabilitated and reinstated in his former rank as vice-admiral.