In 1942 Kádár joined the Communist Party's Central Committee and in 1944 became its chief secretary. In 1946 he became deputy general secretary of the party, and during 1948–1950, following the communist takeover, he was minister of internal affairs and head of the Budapest secret police. In 1949 he participated in the show trial of party member László Rajk. Kádár was subsequently arrested in April 1951 on charges of treason against the party and in 1952 was sentenced to life imprisonment.
In July 1954, following the thaw after the death of Josef Stalin the year before, Kádár was released and given new assignments in the party. On 25 October 1956, two days after the outbreak of the Hungarian Revolution, he replaced Ernő Gerő as general secretary of the party and retained this position until May 1988. Between 30 October and 4 November 1956, Kádár was the deputy prime minister in Imre Nagy's reformist cabinet. Kádár appeared to support Nagy's liberal reform policies but in fact favored less radical changes. On 2–3 November 1956, Kádár was in Moscow negotiating a reversal of the revolution with Soviet leaders. He then returned to Hungary and at Szolnok, about 80 miles southeast of Budapest, openly denounced Hungary's withdrawal from the Warsaw Pact. On 4 November Soviet tanks rolled into Budapest.
Kádár returned to Budapest on 7 November and, with Soviet support, took control of the government. The next day, he announced the formation of the Revolutionary Worker-Peasant Government and its Fifteen-Point Program.
By June 1957 Kádár had stabilized Hungary and secured his position as the most prominent political leader in the country. In doing so, he instituted repressive measures under which Nagy and his fellow reformists were ultimately tried and executed in 1958. This resulted in international condemnation and several years of political isolation for Kádár's government. By the late 1960s, however, Kádár began to implement his so-called Goulash Communism that brought improved relations with the West, a rising standard of living, and relative freedom from Soviet interference. In 1977 Pope Paul VI received Kádár at the Vatican, which symbolically marked the end of Hungary's moral and diplomatic isolation.
Kádár was elected general secretary of the party's Central Committee in 1985. However, by the end of the decade he found it difficult to adapt to Soviet President Mikhail Gorbachev's reform initiatives. By then, Kádár's presence in the party had become an obstacle to internal development and reform. In May 1988 he was relieved as general secretary and assumed the mostly ceremonial post of party president. A year later he was removed from the presidency and ousted from the Central Committee. Kádár died shortly thereafter, on 6 July 1989, in Budapest.
Faragó, Jenő, ed. Mr. Kádár. Budapest: Hírlapkiadó Vállalat, 1989.; Felkay, Andrew. Hungary and the USSR, 1956–1988: Kádár's Political Leadership. Westport, CT: Greenwood, 1989.; Kopátsy, Sándor. Kádár és kora [Kádár and His Era]. Budapest: Belvárosi Kiadó, 2000.