Born in what is modern-day Bosnia and Herzegovina, he attended the State Teachers' College in Sarajevo and for a while taught at a school in Bosnia.
In 1913, Ilić moved to Belgrade where he became a journalist and a member of the Black Hand secret society.
Ilić returned to Sarajevo in 1914 where he worked as an editor of a local Serb newspaper.
He became a member of Mlada Bosna (Young Bosnia).
He recruited Gavrilo Princip, Nedeljko Čabrinović, Vaso Čubrilović, Trifko Grabež, Muhamed Mehmedbašić, and Cvjetko Popović to assassinate Archduke Franz Ferdinand of Austria, which led directly to World War I. He and Gavrilo Princip were close friends.

On Sunday, 28 June 1914, Franz Ferdinand and Sophie von Chotkow were assassinated by Gavrilo Princip.
Princip and Nedeljko Čabrinović were captured and interrogated by the police.
They held out, but Ilić, who was picked up on a routine check, eventually broke down under pressure and named his fellow conspirators.
Muhamed Mehmedbašić managed to escape to Serbia but Veljko Čubrilović, Vaso Čubrilović, Cvjetko Popović and Miško Jovanović as well as Danilo Ilić were arrested and charged with treason and murder.


 
Eight of the men charged with treason and the murder of Archduke Franz Ferdinand were found guilty.
Under Austria-Hungarian law, capital punishment could not be imposed on someone who was under the age of twenty when they had committed the crime.
Nedeljko Čabrinović, Gavrilo Princip and Trifko Grabež therefore received the maximum penalty of twenty years, whereas Vaso Čubrilović got 16 years and Cvjetko Popović 13 years.
Ilić, Veljko Čubrilovic and Miško Jovanović, who helped the assassins kill the royal couple, were executed at the Sarajevo barracks on 3 February 1915.
Born in what is modern-day Bosnia and Herzegovina, he attended the State Teachers' College in Sarajevo and for a while taught at a school in Bosnia. In 1913, Ilić moved to Belgrade where he became a journalist and a member of the Black Hand secret society. Ilić returned to Sarajevo in 1914 where he worked as an editor of a local Serb newspaper. He became a member of Mlada Bosna (Young Bosnia). He recruited Gavrilo Princip, Nedeljko Čabrinović, Vaso Čubrilović, Trifko Grabež, Muhamed Mehmedbašić, and Cvjetko Popović to assassinate Archduke Franz Ferdinand of Austria, which led directly to World War I. He and Gavrilo Princip were close friends.
On Sunday, 28 June 1914, Franz Ferdinand and Sophie von Chotkow were assassinated by Gavrilo Princip. Princip and Nedeljko Čabrinović were captured and interrogated by the police. They held out, but Ilić, who was picked up on a routine check, eventually broke down under pressure and named his fellow conspirators. Muhamed Mehmedbašić managed to escape to Serbia but Veljko Čubrilović, Vaso Čubrilović, Cvjetko Popović and Miško Jovanović as well as Danilo Ilić were arrested and charged with treason and murder. 

 
Eight of the men charged with treason and the murder of Archduke Franz Ferdinand were found guilty. Under Austria-Hungarian law, capital punishment could not be imposed on someone who was under the age of twenty when they had committed the crime. Nedeljko Čabrinović, Gavrilo Princip and Trifko Grabež therefore received the maximum penalty of twenty years, whereas Vaso Čubrilović got 16 years and Cvjetko Popović 13 years. Ilić, Veljko Čubrilovic and Miško Jovanović, who helped the assassins kill the royal couple, were executed at the Sarajevo barracks on 3 February 1915.
Danilo Ilić