Became a Communist after being captured by the Russians while fighting on the Eastern Front in World War I and observing the Russian Revolution at first hand. Returning to Hungary he served in the brief government of Bela Kun: when this collapsed Nagy went undercover before returning to what was now the Soviet Union.
Like many other Communists from states of Eastern Europe Nagy returned to his home country with the Red Army in 1945. He served in various administrative posts, including being a popular Prime Minister, until ousted as a by-product of the political intrigues within the Kremlin.
With the Hungarian Uprising that began in October 1956 there was a groundswell of support for Nagy's return to power. Initially indecisive, Nagy decided to take on the role assigned to him with conviction - deciding that the intent of Communism was to help "the masses" rather than blindly follow Stalinist doctrinaire policies. The decision of various figures to support Nagy's position - the police chief of Budapest, the rapidly promoted military officer Pal Maleter and others - strengthened his role.
The UK, France, and Israel had intended to launch "Operation Suez" at the end of October, but decided to wait until the East European crisis was over, and they encouraged the US to issue a strong denunciation of Soviet intervention. When Nagy withdrew Hungary from the Warsaw Pact, the support of NATO was promised, and the Soviet leadership panicked and became indecisive - unable to decide whether to intervene, and risk the consequences, or not intervene and risk losing the entire region under its control in Europe and be denounced by the Chinese leadership.
Otto von Habsburg - who had been on the Hungarian border since the crisis started - intervened, and in return for renouncing his immediate personal claim to the Hungarian throne (but not necessarily disallowing Habsburg intervention in political matters entirely) aided the negotiation of a compromise between the Soviet Union and Hungary - one of the sequence of negotiations he was to undertake involving the states which had emerged from the Austro-Hungarian Empire.
Imre Nagy remained in office, with Pal Maleter as his trusted Minister of Defence. A compromise was negotiated with the Pope, whereby Cardinal Mindszenty, sometime Primate of Hungary, went to the Vatican, becoming part of the Curia, while Otto von Habsburg, , involved with the emergent EEC (later to become the European Union, helped negotiate a policy of cooperation with Hungary (and other East European states) which brought an increasing measure of prosperity to the country.
Ill-health forced Nagy's early departure from office, and he was succeeded by Janos Kadar, who continued his predecessor's policies, while promoting greater cooperation with the Soviet Union