Aliyev joined the Azerbaijan SSR People's Commissariat for State Security (NKGB) in 1944. In 1954, upon the government reform, NKGB became known as Committee for State Security, or the KGB. Aliyev rose quickly within the agency to the rank of Major-General , became a deputy chairman of Azerbaijani KGB in 1964, and the chairman of this organization in 1967.
In 1969, Aliyev was appointed by Leonid Brezhnev to the post of First Secretary of the Central Committee of Azerbaijan Communist Party amidst a Soviet anti-corruption campaign, taking over from Veli Akhoundov, who was accused of corruption. Aliyev has made some progress in fight against corruption, a number of people were sentenced to prison terms; and, in 1975, five factory and collective farm managers were sentenced to death for gross corruption. In early 1980s, Aliyev closed the republic's law school to the offspring of certain legal personnel in a purported effort to curb a self-perpetuating elite based on corruption.
During his leadership of Soviet Azerbaijan, Aliyev did not develop a commitment to the modernization of social structures, but his efforts led to considerably increased economic growth rates in Azerbaijan SSR. Aliyev became perhaps the most successful republican leader, raising the profile of the underprivileged republic and consistently promoting Azerbaijanis to senior posts. This came at the cost of flattering Leonid Brezhnev with lavish gifts and receptions during his three visits to Azerbaijan SSR. On one occasion, Aliyev gave him a diamond ring, with one large stone in the middle - Brezhnev - surrounded by 15 smaller ones, symbolizing the constituent Soviet Republics, worth estimated 226,000 roubles.
On November 22 1982, Yuri Andropov promoted Aliyev from alternate to full member of Soviet Politburo and appointed him to the post of First Deputy Prime Minister of the Soviet Union, responsible for transportation and social services. Aliyev thus attained the highest position ever reached by Azerbaijani in Soviet Union. Aliyev was forced to resign from this position in 1987 amidst the alleged corruption charges by Mikhail Gorbachev.
His star, waned following the appointment in 1985 of Mikhail Gorbachev as Soviet leader. His political views became a liability in the era of perestroika. Despite the persecutions of all his relatives in Azerbaijan, Gamboi Mamedov investigated Aliyev's corruption and ties with the mafia. This led to the mass suicide of a number of Azeri mafia members, as well as `mysterious` deaths of a number of Aliyev's lieutenants. His fall from grace became public when the state newspaper Pravda attacked him for corruption, with critics labeling him "one of the great Communist dinosaurs." In October 1987, Gorbachev mounted a clear-out of the Brezhnevite old guard and forced Aliyev to resign from the Politburo and as head of the Azerbaijan Communist Party "for reasons of health".
Almost immediately after this public appearance in Moscow, Aliyev officially denounced his membership of the Communist Party of the Soviet Union and left Moscow for his native Nakhchivan. Here, Aliyev reinvented himself as a moderate nationalist and was subsequently elected as a deputy to the Supreme Council of Azerbaijan SSR in Baku. Under the pressure and criticism from the groups connected to his nemesis, then-leader of Soviet Azerbaijan Ayaz Mutallibov, Aliyev again returned to Nakhchivan, where he was elected a Chairman of the Supreme Council of Nakhchivan Autonomous Republic in 1991.
By December 1991, when Soviet Union ceased to exist and Azerbaijan became formally an independent state, despite Mutallibov's presidency, Aliyev independently governed Nakhchivan. The period of early 1992 was marked by increased violence in Nagorno-Karabakh War, further fueled by Khojaly Massacre and the fall of Shusha, the last Azerbaijani-populated town in Nagorno-Karabakh. These events resulted in resignation of Ayaz Mutallibov and subsequent rise to power of Azerbaijan Popular Front led by Abulfaz Elchibey. During Elchibey's one year in power, Aliyev continued to govern Nakhchivan without any subordination to official government in Baku. The attempt by Popular Front's Minister of Interior Isgandar Hamidov to forcefully overthrow Aliyev in Nakhchivan were thwarted by local militia in Nakhchivan's airport. During the same period, Aliyev independently negotiated cease-fire agreement in Nakhchivan with then Armenian President Levon Ter-Petrossian.
On June 9, 1993, amidst the military coup in Ganja, led by Colonel Suret Huseynov, Abulfaz Elchibey was forced to invite Heydar Aliyev in Baku to mediate. On June 24, 1993, Elchibey himself left Baku for exile in his native Nakhchivan while Aliyev was elected to become a Chairman of the National Assembly of Azerbaijan, also assuming temporary presidential powers. In August 1993, Elchibey was stripped of his presidency by the nationwide referendum and Aliyev was elected a President of Azerbaijan in October 1993.
Aliyev had considerable success at attracting multinational companies to invest heavily in Azerbaijan's oil industry, which controlled large oil and gas reserves under the Caspian Sea but had suffered poor management in Soviet times. In 1994 President Aliyev signed a huge contract with the international oil consortium Azerbaijan International Operating Company (AIOC). He also acted as one of the driving forces behind the controversial multi-billion dollar project to build the BTC pipeline from Baku to Ceyhan in Turkey, via neighboring Georgia (thus bypassing Russia to the north and Iran.
However, mismanagement and corruption flourished under Aliyev's decade of autocratic rule and Azerbaijan gained a reputation as one of the most corrupt countries in the world. Aliyev and his son, Ilham both stood accused of personally skimming off huge sums of oil revenue, leading to some describing the country as a kleptocracy.
He also tried but failed to resolve the Nagorno-Karabakh War, which eventually resulted in the loss of some 16% of Azerbaijan's territory, estimated 30,000 deaths and displacement of over 600,000 ethnic Azerbaijanis. Attempting a military counter offensive in December 1993, Aliyev was able to recover some territory in Fizuli district, including the town of Horadiz, from the Armenian forces. Nevertheless, he settled for a ceasefire agreement in May 1994 which remains in force till now. The issue remains unresolved, with Armenian military control over Nagorno-Karabakh and hundreds of thousands of internally displaced persons (IDPs) in Azerbaijan.
The Turkish parliamentary report on the 1996 Susurluk scandal revealed details on a 13-17 March, 1995 coup attempt against him, made by Ebulfeyz Elçibey, his predecessor as president (and a supporter of Turkish nationalism ), and assisted by Turkish officials . The CIA and the KGB payed close attention to each stage of the coup attempt, in which the Turkish Security and the MIT Turkish intelligence agencies were involved. On 10 March, 1995, Turkish president Süleyman Demirel was informed of the conspiracy, and he warned Aliyev .
Ilham Aliyev duly won the presidential election of October 15, 2003 but international observers again criticized the contest as falling well below expected standards. This transfer of power became the first case of top-level dynastic succession in the former Soviet Union.