In 1902, Kočić published his first short story collection. He published two more short story collections in 1904 and 1905, and subsequently adapted one of his most successful short stories, "The Badger on Trial", for the stage. Kočić subsequently led several demonstrations in Sarajevo and was imprisoned on three occasions for publishing newspaper tracts critical of Habsburg rule. He spent the majority of his imprisonment in solitary confinement, which contributed to his development of depression. In 1909, Kočić was released as part of a general amnesty. The following year, he published his third and final short story collection, and won a seat in the newly created Bosnian Parliament ("Sabor"), where he became the leader of a faction of anti-Austrian Serb nationalists. He lobbied for increased concessions to Bosnian Serb peasants and farmers, agitating against the Austro-Hungarians as well as the Bosnian Muslim landowning class. He left the "Sabor" in 1913, citing mental exhaustion. In January 1914, Kočić was admitted into a Belgrade mental hospital, where he died two years later.