Štefánik was born in Košariská, Austria-Hungary (now Slovakia), on July 21, 1880. He had 12 brothers and sisters, two of whom died at a young age. His father, Pavol Štefánik, was a local Lutheran pastor, and his mother was Albertína Jurenková. He attended schools in Bratislava, Sopron and Szarvas.
In 1898, he began studying construction engineering in Prague. In 1900, he transferred his studies to Charles University, where he attended lectures in astronomy, physics, optics, mathematics and philosophy. For the 1902 summer semester, he went to university in Zürich. The Prague years had a great impact on Štefánik because he met many important personalities there. The philosophy lectures were given by Tomáš Garrigue Masaryk, the Future first President of Czechoslovakia, who inspired Štefánik with the idea of co-operation between the Czechs and the Slovaks. Furthermore, Štefánik very actively participated in the work of the Slovak student association, Detvan, (and within Detvan, the so-called Hlasists group); he became acquainted with Vavro Šrobár. His studies were financed largely by Czech associations, including Českoslovanská jednota (Czechoslavic Unity) and Radhošť since he could not afford them himself. In Prague, he wrote political and artistic texts in which he tried to inform the Czechs of the disastrous situation of the Slovaks at that time. He graduated in 1904 with a doctorate in philosophy and with a thorough knowledge of astronomy: he even finished his studies with a thesis in astronomy. He wrote his thesis about a star which was discovered in the Cassiopeia constellation in 1572.
In 1904, he went to Paris to find a job in astronomy with a recommendation from a Czech professor who was known in Paris. Initially, he had no money and no command of French, but he was nevertheless able to obtain a job at the famous Paris-Meudon Observatory after its Director, Pierre Janssen, one of the cofounders of astrophysics, saw Štefánik’s talent. Štefánik owed to Janssen and Camille Flammarion his social, political and scientific career. The observatory was the most important centre for astronomy at the time so he gained massive prestige from his job.
Between 20 June and 4 July 1905, Štefánik climbed Mont Blanc (he did so several more times in the following years) to observe the Moon and Mars. Then, he took part in an official French expedition to observe and record a full eclipse of the Sun in Alcossebre, Spain. He thus established his own reputation in French scientific society. He worked with Gaston Millochau, a member of the Académie Française, which made some of its members read his work. His studies and the results of his observations were published in reports to the Académie, and he received several awards for them. Later, he was invited to an international Astronomer conference in Oxford on solar research. Between 1906 and 1908, he was co-director of the Mont Blanc observatories company.
At the end of 1907, however, Janssen died and Štefánik lost his job. Since 1908, he had been charged by the French authorities with astronomical and meteorological observations, (mainly observations of solar eclipses) and political tasks in various countries all over the world, including (Algeria, Morocco, Turkistan, Russia, India, the United States, Panama, Brazil, Ecuador, Australia, New Zealand, Tahiti, Fiji, and Tonga). In Tahiti, he also built an observatory and a network of meteorological stations (rumour has it that much of his time in the Pacific Ocean was spent on spying on German positions). Between the trips, he regularly returned home to Košariská (the last time in 1913 for his father’s funeral). In South America (especially in the Galapagos Islands in Ecuador), he had an opportunity to show his diplomatic skills for the first time.
Štefánik worked in astrophysics and solar physics, and became well known for his spectral analysis of the sun's corona. He was involved in perfecting spectrography and has been considered a predecessor of Bernard Lyot. He also attempted to construct a machine for colour photography and cinematography, and he had his design patented in 1911.
Štefánik returned to Paris at the end of 1915, where he became acquainted with Edvard Beneš and renewed his association with his former professor, Masaryk. In 1916, the three men founded the Czechoslovak National Council, which led to the government of Czecho-Slovak resistance abroad and to the creation of Czechoslovakia in 1918. After 1917, he became vice President of the council. His diplomatic skills made Štefánik able to help arrange a meeting of Masaryk and Beneš to meet and obtain the support of some of the most important personalities of the Triple Entente. For Example, he organized Masaryk’s meeting with the French prime minister, Aristide Briand.
In 1916, Štefánik and the Czecho-Slovak resistance started to organise the Czechoslovak Legions to fight against Austria-Hungary and Germany. For this purpose, Štefánik, both as the Czechoslovak Minister of War and as a French general, went to Russia in February 1917 and then to the United States. He also organized legions in France and Italy. It was largely his personal diplomatic skills and contacts that made the Entente recognise the Czechoslovak National Council as a de facto government and the Czechoslovak Legions as allied forces in the summer and the autumn of 1918.
In addition to his scientific missions overseas, he also performed diplomatic tasks. He established contacts and friendships with leading scientific, artistic, political, diplomatic and Business personalities. He participated in the establishment of Business enterprises in France and other countries. His friends included Physicist Henri Poincaré, Eugéne Aymar de la Baume, Joseph Vallot (the richest man in France), Architect Gustave Eiffel, Roland Bonaparte, Prime Minister Camille Chautemps, a French Entrepreneur called Devousoud from Chamonix, American Astronomer and admiral Simon Newcomb and American diplomat David Jayne Hill. In 1912, he received French citizenship, recognition and access to the French élite. On October 20, 1917, he was made a Grand Officier of the Legion of Honour. At the same time, he had some personal problems and a serious stomach illness, which did not get better even after two surgeries. Moreover, World War I had started in Europe.
Sources do not substantiate rumours of disagreements arising between Štefánik and Beneš or Masaryk, mainly on the position of Slovakia in Czechoslovakia. On the contrary, telegrams sent by Štefánik from Vladivostok to the Czechoslovak National Council in Paris on 7 December 1918 indicate that Štefánik had a good relationship with them. To Masaryk, he wrote "with my filial feelings and a great patriotic happiness, I salute you, venerable professor, as the first President of the Czechoslovak Republic". To the President of the Council, Karel Kramář, he wrote, "Thank you, my dear President, for having chosen me as member of our National Ministry. You and your other co-workers can be sure of my loyalty and my fraternal feelings". To Beneš, he was even more friendly by using informal pronouns (he used formal pronouns to address Masaryk and Kramář): "Mr. Beneš, Ministry of Foreign Affairs in Prague: "I hug you affectionately, my loyal and precious companion during the hours of anxiety". (The beginning can be translated instead as "I kiss you on the cheek".) The telegrams appear to show that Štefánik gave his full support to the union of the Czechs and Slovaks that was led by Masaryk.
When Štefánik wanted to return home to see his family, he decided to fly from Campoformido, near Udine, Italy, and to use an Italian military plane, a Caproni Ca.3. On May 4, 1919, at around 11 a.m., his plane tried to land near Bratislava, a military conflict area between the First Republic of Czechoslovakia and the Hungarian Soviet Republic, but crashed near Ivanka pri Dunaji. Štefánik died, along with the rest of the crew (two Italian pilots, Colonel Giotto Mancinelli Scotti and Sergeant Umberto Merlino, as well as a mechanic-radiotelegrapher, Gabriel Aggiusto).
Štefánik's tomb was built in 1927 to 1928 on Bradlo Hill in Brezová pod Bradlom. The monumental but austere memorial was designed by Dušan Jurkovič.