Ilhamija was born into a MuslimBosniak family in Žepče, Sanjak of Bosnia, Ottoman Empire. His father's name was Abdulvehab. Both his parents died during his youth. A quote from one of his poems is "A mother I do not have, and my father I do not remember." Ilhamija was educated in his birth town and in Tešanj and Fojnica. He also attended the Ferhadija Mosque in Tešanj. His final work, the Bosnian Book of the Science of Conduct, is a work that lists 54 religious duties that each follower of Islam must know about, believe in, and fulfill, followed by advice on what a religious person should and should not do. It was published posthumously in 1831, a decade after his death. The book is printed in Arebica, the variant of Perso-Arabic script used to write Bosnian language, mainly between the 15th and 19th centuries, after the conquest of Bosnia by the Ottoman Empire.
Execution
In the year 1820, a man named Dželaludin-paša became the Ottoman pasha of Bosnia, a title he would hold until his brutal death in 1821. At first, Abdulvehab Ilhamija supported Dželaludin, believing him to be a fair and just ruler. But over a short time the illusion faded and Abdulvehab Ilhamija openly criticized Dželaludin's harsh rule over the Bosnian population in his poetry and writings. In 1821, Dželaludin became aware of Ilhamija's criticisms and invited him to his home in Travnik. Ilhamija traveled without a horse, on foot from Žepče to Travnik. Before he left, he bid a final farewell to his family and friends, anticipating a grim ending to his meeting with the pasha. To this day, what happened in Travnik remains in the sphere of assumption. There is a legend that says that Dželaludin-paša asked of Ilhamija to renounce his critical writings, when Ilhamija refused to do so, he was either strangled to death or decapitated in the Travnik Fortress. News of his death was received with sorrow and revolt among the people. He was buried in Travnik in mausoleum near a former railway station and former hospital, where he remained buried for 138 years until 1959, when his bones and headstone were moved to a different grave.
Fellow Bosniak writer Muhamed Hadžijamaković wrote a biography of Abdulvehab Ilhamija entitledIlhamija: Život i djelo. Rešad Kadić wrote a book about Abdulvehab Ilhamija's death entitled Ilhamijin put u smrt, originally published in 1976.