Danilo Ilic was born in Bosnia-Herzegovina in 1891. He attended the State Teachers' College in Sarajevo and for a while taught at a school in Bosnia. In 1913 Ilic moved to Belgrade where he became a journalist and a member of the Black Hand secret society.
Ilic returned to Sarajevo in 1914 where he worked as editor of a local Serb newspaper. He began recruiting young men into the Black Hand group and that summer agreed to help Gavrilo Princip, Nedjelko Cabrinovic, and Trifko Grabez to assassinate Archduke Franz Ferdinand.
On Sunday, 28th June, 1914, Franz Ferdinand and Sophie von Chotkovato were assassinated by Gavrilo Princip. Princip and Nedjelko Cabrinovic were captured and interrogated by the police. They eventually gave the names of their fellow conspirators. Muhamed Mehmedbasic managed to escape to Serbia but Ilic, Veljko Cubrilovic, Vaso Cubrilovic, Cvijetko Popovic and Misko Jovanovic 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 Austro-Hungarian law, capital punishment could not be imposed on someone who was under the age of twenty when they had committed the crime. Nedjelko Cabrinovic, Gavrilo Princip and Trifko Grabez therefore received the maximum penalty of twenty years, whereas Vaso Cubrilovic got 16 years and Cvijetko Popovic 13 years. Danilo Ilic, Veljko Cubrilovic and Misko Jovanovic, who helped the assassins kill the royal couple, were executed on 3rd February, 1915.