Sandanski was born in the village of Vlahi near Kresna in Ottoman Empire on May 28, 1872. His father Ivan participated as a standard-bearer in the Kresna-Razlog Uprising. After the crush of the uprising, in 1879 his family moved to Dupnitsa, Bulgaria, where Sandanski received his elementary education. From 1892 to 1894 he was a soldier in the Bulgarian army. Sandanski was an active supporter of the Radoslavov's wing of the Liberal Party and shortly after it came to power in February 1899, he was appointed head of the Dupnitsa Prison. Because of that, his name "Sandanski" distorted from "Zindanski" that comes from Turkish "Zindancı" (lit. Dungeon Keeper or Jailer).
Yane Sandanski was involved in the Revolutionary Movement in Macedonia and Thrace and became one of its Leaders. He joined initially the Supreme Macedonian-Adrianople Committee (SMAC) in 1895 during an incursion into the Muslim-inhabited regions of the central Rhodopes ìn Thrace. In the next five years, Sandanski was a SMAC Activist in the Pirin region, but in 1900 returned to become a Director of the local prison in Dupnitsa. In 1901, Sandanski switched to the Internal Macedono-Adrianopolitan Revolutionary Organization (IMARO). He built up the organization’s network of committees in the districts of Serres and Gorna Dzhumaja in the Pirin region, and that is why the people gave him the nickname "PirinTsar" (Pirinski Tsar). He was also one from the organizers of the Miss Stone Affair - America's first modern hostage crisis. On September 3, 1901, a Protestant missionary named Ellen Stone set out on horseback across the mountainous hinterlands of Macedonia and was ambushed by a band of armed Revolutionaries. Sandanski was also active in the anti-Ottoman Ilinden-Preobrazhenie Uprising. The Militias active in the region of Serres, led by Yane Sandanski and an insurgent detachment of the Macedonian Supreme Committee, held down a large Turkish force. These actions began on the day of the Feast of the Cross and did not involve the local population as much as in other regions, but were well to the east of Monastir and to the west of Thrace.
On the other hand, the bigger fraction (the Centralists), as well as that of the other revolutionary organization - Macedonian Supreme Committee - Varhovists, (most of which followers joined the "Centralists", after its dissolution in 1903) aimed also at autonomy. But they did not expected inclusion in a Balkan Socialist Federation and had not so extreme policy by their relation to Sofia. These political differences led to sharp conflict between them.
After the Young Turk Revolution in 1908 and during the Second Constitutional Era Sandanski (in association with Hristo Chernopeev, Chudomir Kantardziev, Aleksandar Buynov and others) contacted the Young Turks and started legal operation. After the disintegration of IMARO, they tried to set up the Macedonian-Adrianople Revolutionary Organization (MORO). Later, the congress for MORO's official inauguration failed and Sandanski and Chernopeev started to work towards a creation of one of the left political parties in the Ottoman Empire – People's Federative Party (Bulgarian Section), whose headquarters was in Solun. This federalist project was supposed to include different ethnic sections in itself, but this idea failed and the only section that was created was the faction of Sandanski, called Bulgarian section. In this way its Activists only "revived" their Bulgarian national identification, as Sandanski's faction advocated the particular interests of the "Bulgarian nationality" in the Empire. In 1909 the group around Sandanski and Chernopeev participated in the rally of the Young Turks to Istanbul that led to the deposition of Sultan Abdul Hamid II from the throne. Sandanski dreamed about the creation of a Balkan Federative Republic according to the plans of the Balkan Socialist Federation and Macedonia as a part of that Federation. He demanded that the IMARO should embrace all nationalities in the region, not only Bulgarians.
In this way it would be possible to create a healthy system aimed at the organisation of a mass uprising. Later Sandanski and his faction actively supported the Bulgarian army in the Balkan wars of 1912–1913, initially with the idea, that their duty is to fight for autonomous Macedonia, but later fighting for Bulgaria. Οbserving the atrocity of Serbs over the local population, former IMORO members began restoration of the organizational network. In the same period a group around Petar Chaulev began negotiations with the Albanian Revolutionaries. The temporary Albanian government proposed to them a Common revolt to be organized and risen. The negotiations from the part of the Organization had to be carried by Petar Chaulev. The Bulgarian government believed however, that it would not come to a new war with Serbia, so it did not attend the negotiations. However, later, in June 1913 the Bulgarian government sent in Tirana Yane Sandanski for new negotiations. He gave an interview for the newspaper "Seculo", where he said that he came to agreement with the Albanians and that from the Bulgarian side there would be organized bands and assaults. So he helped the preparation of the Ohrid-Debar Uprising, organised jointly by IMORO and the Albanians of Western Macedonia. After the wars, Pirin Macedonia was ceded in 1913 to Bulgaria and Sandanski resettled again in the Kingdom where he was killed in 1915 by his political opponents.
The Centralists organised several unsuccessful assassination attempts against Sandanski. They came closest to achieving their goal in Thessaloniki, where Tane Nikolov managed to kill two other Federalists and heavily wounded Sandanski. Eventually, Sandanski was killed near the Rozhen Monastery on April 22, 1915, while travelling from Melnik to Nevrokop, by local IMARO Activists.
In the Republic of Macedonia Sandanski is considered a national hero and one of the most prominent revolutionary figures of the 20th century. However some Macedonian mainstream specialists on the history of local revolutionary movement, like Academician Ivan Katardžiev and PhD. Zoran Todorovski, argue that the political separatism of Sandanski represented a form of early Macedonian nationalism, asserting that at that time it was only a political phenomenon, without ethnic character. Both define all Macedonian Revolutionaries from that period as "Bulgarians", as products of the Bulgarian educational system and Bulgarian Church, which had a policy of producing “Bulgarian national consciousness” in its Exarchist schools. According to them Macedonian identity arose mostly after the First World War and Sandanski identified himself as Bulgarian too. Вulgаriаn Historian Stoyan Boyadziev has described Sandanski as extremely controversial Bulgarian revolutionary, whose separatist асtivitу however, produced as a whole Macedonian nationalism. Today, Sandanski is one of the names mentioned in the National anthem of the Republic of Macedonia. In Bulgaria the communist regime appreciated Sandanski because of his socialist ideas and honoured him by renaming the town Sveti Vrach to Sandanski, in 1949. In the years after the Fall of Communism some right-wing Bulgarian historians have been keen to discredit his reputation. Sandanski Point on the E coast of Ioannes Paulus II Peninsula, Livingston Island, Antarctica was named after him by the Bulgarian Antarctic Expedition.
The Macedonian liberation movement consisted of three major factions. Led by his excessive ambitions, Sandanski came into conflict with the majority — the Centralists in IMARO and the Varhovists. Although initially a member of the Bulgarian nationalistic Varhovists band, later Yane Sandanski and his Serres group (the Federalists) proclaimed a fight for an autonomous Macedonia which was to be included in a Balkan Socialist Federation. In this manner, the policy of Sofia was completely identified to the adversary character of Athens and Belgrade. The Activists of Serres nonetheless stipulated that the Macedonian Question could not be resolved if it is formulated as a part of a Bulgarian national question. After the Ilinden Uprising, this Group insisted on cooperation with all ethnic and religious groups in the Ottoman Empire and envisioned the inclusion of Macedonia and the district of Adrianople in a Balkan Federation. However the idea of Macedonian autonomy was strictly political and did not imply a secession from Bulgarian ethnicity, even as it was seen at a later stage of the struggle by the group around Sandanski, that espoused a number of classical liberal ideas intermingled with socialism, imported from Bulgaria.
The Historian Hristo Silyanov provides a position of Sandanski’s where he states that the solution of the Macedonian question is not the unity with Bulgarians, and that the Macedonian population had to emancipate itself as a self-determining (or an independent) people. However Siljanov described all IMARO Revolutionaries as Bulgarians and used the term Macedonian only as regional designation.