Born in Černová (today part of the city of Ružomberok) in the Liptó County of the Kingdom of Hungary (present-day Slovakia), Hlinka graduated in theology from Spišská Kapitula and was ordained priest in 1889. He tried to improve the social status of his parishioners, fought against alcoholism, organized educational lectures and theater performances. He founded credit and food bank associations to help ordinary people and wrote manual how to found further.
In his political views he was a strong defender of Catholic ethics against all secularizing tendencies connected with economic and political liberalism of the Kingdom of Hungary at the end of the 19th and the beginning of the 20th century. This was also the opinion of the Hungarian Katolikus Néppárt (Catholic People's Party), led by Count Zichy, so Hlinka became an activist of this party. However, as the party disregarded Slovak demands Hlinka left and along with František Skyčák founded the Slovak People's Party.
He gained wide popularity thanks to his social activities. In 1905, he was elected parson in Ružomberok against the wishes of his Hungarian bishop Alexander Párvy. In the elections of 1906, he supported Slovak candidate Vavro Šrobár and featured in favor of the Slovak national movement. His activities met with disapproval from the church hierarchy, which suspended him as a priest. On June 27, 1906, he was imprisoned and later convicted of sedition. While Hlinka was suspended and waited for admission to prison, the bishop tried to consecrate the church in Černová (built thanks to Hlinka) by force. The Černová massacre brought international attention to violations of national rights in the Kingdom of Hungary. In prison, Hlinka led the translation of the Old Testament into the Slovak language. His friends worked on his rehabilitation and Hlinka, who complained of his suspension to the Holy See, finally won the case against the bishop.
In 1907, he founded Ľudová banka (People's Bank) and became the chairman of the board three years later.
The Slovak People's Party was separated from the Slovak National Party in 1913. Hlinka became party chairman and remained in this position for the rest of his life.
At the end of World War I, Hlinka significantly contributed to the creation of Czechoslovakia. On the confidential meeting of the Slovak National Party on 24 May 1918, he took a clear position and ended discussion of undecided participants ("Thousand years old marriage with the Hungarians goes wrong. We have to divorce.") He became a member of the Slovak National Council and signed the Martin Declaration, which advocated a political union with the Czech nation. In the early period of Czechoslovakia, when a part of the Church hierarchy still preferred the Kingdom of Hungary, he intensively lobbied for the new state.
Hlinka quickly became disappointed by the undemocratic methods of his ex-colleague Vavro Šrobár (Minister-plenipotentiary for Slovakia affairs), some anti-religious actions and the unequal position of Slovakia. He complained to the Prime Minister and warned him that we will escalate problems to Paris peace conference. Hlinka believed that the problems could be solved on the basis of the Pittsburgh Agreement which promised autonomy of Slovakia within Czechoslovakia. On 28 August 1918, he really traveled to Paris under an influence of František Jehlička, whom Hlinka blindly trusted. Hlinka then distributed a memorandum about Slovakia to journalists and diplomats but failed to meet with key decision makers. Hlinka who arrived on a false passport was hustled out of Paris by French police. The action was timed badly, almost seriously harmed the interests of Czechoslovakia and damaged the image of Slovak autonomists. Except Hlinka, all participants stayed abroad and later worked for Hungarian irredentism. Even the Slovak People's Party distanced itself from the action of its leader. Hlinka was imprisoned, moved to political isolation and the ability of SĽS to act was limited.
Regardless of the mistake, Hlinka remained popular among voters of the Slovak People's Party. In April 1920, he was elected to the Czechoslovak Parliament and released from prison. Thereafter, he led the struggle for autonomy and for acknowledgment of an independent Slovak nation for almost 20 years. His motivation was based on religious and language grounds. Hlinka accepted the idea of the common Czechoslovak political nation but believed that centralism and ethnic Czechoslovakism threatened Slovak interests and their national and cultural identity ("We are for the common state of Czechs and Slovaks, but we are for the application of national individuality of both constituent nations.") His party quickly became the most popular party in Slovakia with potential around 25%-35%.
Hlinka was known for his charisma, temperament, stubbornness and sharp tongue. The same qualities made him a difficult partner for negotiation. Hlinka had custom to insult his opponents and they criticized him for primitivism. The lack of higher education led him to an uncritical admiration of some of his questionable coworkers. This was especially the case of Vojtech Tuka who several times undermined the interests of the party, but preserved Hlinka's trust regardless of the resistance of the HSLS.
At the end of his life, Hlinka was more a living symbol of the party than a real policymaker. In 1936, the party got closer to authoritative and undemocratic political ideas. Hlinka sympathized with authoritarian regimes like Salazar's Portugal or Dollfuss' Austria which attracted him by certain type of clericalism. Already during his life, his party was internally divided into two wings - the conservatives led by Catholic priest Jozef Tiso and the radicals, mostly young dissatisfied members. Hlinka tried to balance them and for tactical reasons supported them alternately. Hlinka, who never well understood foreign policy, considered cooperation with Konrad Henlein and János Esterházy. In February 1938, he refused closer cooperation with German minority parties, criticized the persecution of Christians in Germany and declared that Hilter is a "cultural beast".
On June 5, 1938 Hlinka made a speech in a demonstration in Bratislava where he again raised a demand for Slovak autonomy. He signed the third proposal for the autonomy but died before he reached his goal. Only after the Munich Agreement when Czechoslovakia got into Nazi sphere of influence, loss of the Czech borderland and under the threat of territorial demands of Hungary, HSLS exploited the weakness of the state and declared autonomy on October 6, 1938, less than two months after Hlinka's death.
During the first Slovak Republic (1939–1945), Hlinka was considered by the regime as a national hero. In Communist Czechoslovakia Hlinka was portrayed as a "clerofascist".
After the fall of Communism, Hlinka became again a respected person, mostly to nationalist sympathisers and to Christian democratic organisations, while the rest of current Slovak society seems mostly indifferent towards Hlinka's memory. Hlinka's image could be found on the Slovak 1000-crown banknote, before Slovakia's adoption of the Euro in 2009. A motion in the Parliament of Slovakia to proclaim him "father of the nation" nearly passed in September 2007.
Now Andrej Hlinka is mostly commemorated in his native Černová where Andrej Hlinka´s House can be found. The exhibit is open to the public. Recently the Mausoleum of Andrej Hlinka in Ružomberok was re-opened.