As a high school student he was involved in radical nationalist politics and joined the group that tried to assassinate Croatian ban (viceroy) Slavko Cuvaj. Foreign his role in failed assassination he received two years of prison sentence, which he served in Sremska Mitrovica penitentiary. Because of that he often had to deal with police and emigrate to Prague, Vienna, Moscow and Spain, where he spent some time during Spanish Civil War.
Cesarec, who had discovered his literary talent in teenage years, was also known as one of the leading Croatian literary figures of his time.
He wrote poems, plays, short stories and novels and participated in literary magazines run by Miroslav Krleža. Best example for that could be found in novel Zlatni mladić ("Golden Youth"), a character study of a young man born in privileged capitalist family who gets away with all kinds of crimes.
The novel was so popular that the phrase zlatna mladež ("golden youths") entered Croatian vocabulary and was reintroduced in 1990s in order to describe spoiled children of post-Communist nouveau riche. Few weeks later the prison was taken by new Ustasha regime.
On July 9, Ustashas had 10 prisoners, including Božidar Adžija, Otokar Keršovani and Ognjen Prica, shot as retaliation for Partisan activities.
Fearing that the rest of the inmates will be shot soon afterwards, Croatian Communist Party organised a prison-break on the night of July 13. The prison guards were overtaken and inmates escaped. But the operation proved to be poorly organised and most of the prisoners, including Cesarec, were quickly recaptured and shot in Maksimir woods few days later.
From 1915 to 1918 he served in Austro-Hungarian Army and experiences of World War I made him into an enthusiastic supporter of October Revolution and Communism. Cesarec"s work was heavily influenced by his politics and ideology - in his plays and novels Cesarec expressed his utter disgust for capitalism and bourgeoisie, portraying characters belonging to that social class as vile, corrupt and perverse monsters.
After the war he became a member of the Communist Party of Yugoslavia. In March 1941, a few days before the Axis invasion of Yugoslavia, he was arrested and interned in Kerestinec prison together with some 90 leading members of Croatian left-wing intelligentsia.