Zakariya Ashiq, 20, from Coventry, left the UK in November, but was forced to return after failing to cross the border from Jordan into Syria, the Old Bailey was told.
He was arrested at Heathrow airport on his way home on 20 November.
Mr Ashiq denies preparing acts of terrorism.
He has also pleaded not guilty to assisting other people to take part in terrorist acts.
The prosecution said exchanges found on his mobile phone revealed he appealed to two friends for help in crossing the border.
Sarah Whitehouse QC said the friends, also from Coventry, were believed to have previously travelled to Syria.
The court heard that in one conversation recorded on the WhatsApp messaging service Mr Ashiq said to them: "Oh, seriously man, just get me there, man... I don't know how you gonna get me, but you have to get me across."
In other messages he wrote "there's no life, no life without Jihad" and pledged to do "Ishtishadi (martyrdom) against... all these people", the jury was told.
The trial heard Mr Ashiq declared his admiration online for Islamic State, as well as searching for phrases such as "IS beheading journalist" and "44 ways to support Jihad".
Ms Whitehouse said it was not the first time the defendant had attempted to reach Syria.
In March 2014, he was stopped along with his father at Birmingham Airport, but said he was planning to visit Turkey and some refugee camps on the border.
After the two fell out the defendant returned home on 20 May, the trial heard.
Two months later he missed a flight because he was talking to police. He told officers he was intending to go to Corfu.
When he was arrested in November, Mr Ashiq, of Station Road, told officers that any messages which suggested he supported IS were simply to "wind people up".
The trial continues.
A young British Muslim repeatedly tried to join Islamic State in Syria in a bid to achieve his ambition of becoming a martyr, his trial has heard.