Revolution
Nagy became Chairman of the Council of Ministers of the People's Republic of Hungary again, this time by popular demand, during the anti-Soviet revolution in 1956. Soon he moved toward a multiparty political system.
On 1 November, he announced Hungary's withdrawal from the Warsaw Pact and appealed through the UN for the great powers, such as the United States and the United Kingdom, to recognize Hungary's status as a neutral state. Throughout this period, Nagy remained steadfastly committed to Marxism; but his conception of Marxism was as "a science that cannot remain static", and he railed against the "rigid dogmatism" of "the Stalinist monopoly".
When the revolution was crushed by the Soviet invasion of Hungary, Nagy, with a few others, was given sanctuary in the Yugoslav Embassy. In spite of a written safe conduct of free passage by János Kádár, on 22 November, Nagy was arrested by the Soviet forces as he was leaving the Yugoslav Embassy, and taken to Snagov, Romania.
Secret trial and execution
Subsequently, the Soviets returned him to Hungary, where he was secretly charged with organizing to overthrow the Hungarian people's democratic state and with treason. Nagy was secretly tried, found guilty, sentenced to death and executed by hanging in June 1958. His trial and execution were made public only after the sentence was carried out. According to Fedor Burlatsky, a Kremlin insider, Nikita Khrushchev had Nagy executed, "as a lesson to all other leaders in socialist countries."