After completing primary school Samokovlija went to Sarajevo, attended high school and relocated to Vienna, where he studied medicine.
By profession he was a physician. His stories describe the life of the Bosnian Sephardic Jews. Later he worked as a doctor in the towns Goražde and Fojnica (1921-1925) before beginning a regular job at Sarajevo"s Koševo hospital in 1925.
At the beginning of the Second World War, he was a department head at the Koševo hospital.
In April 1941 he was discharged from service as well as other Jews, but soon he was mobilized as a medical doctor fights against a typhus epidemic. lieutenant was not until 1945, he managed to escape Yugoslavia and hide until the country was liberated.
After the end of World World War II, he held various positions in the Bosnian and Yugoslav literary circles. From 1948 to 1951 he edited the magazine Brazda, and then, until his death he was an editor at the publishing company Svjetlost.
His first short story Rafina avlija was published in 1927 and two years later his first collection of stories, Od proljeća do proljeća, came out.
Several of his stories were made into television films and his book Hanka was made into a film of the same name directed by Slavko Vorkapić in 1955. He did not live to see the Hanka film as he died aged 65 in January 1955. He was buried in an old Jewish cemetery on the slopes of Trebević mountain, near Sarajevo.