Ednane Mahmood, 19, from Blackburn, Lancashire, then fled his home to allegedly travel to Syria to fight for so-called Islamic State (IS).
The video showed the beheading of David Haines and aid worker Alan Henning kneeling on the ground after his kidnap, Manchester Crown Court heard.
Mr Mahmood denies all charges.
He has pleaded not guilty to attempting to travel to Syria to commit acts of terrorism.
Mr Mahmood also denies two counts of providing internet links to others with speeches and propaganda that encouraged acts of terrorism.
He searched "British man beheaded" on his laptop before downloading the video, the court was told.
It began with Prime Minister David Cameron talking about IS before images showing the beheading of Mr Haines.
Julian Evans, prosecuting, said Mr Mahmood, "undeterred by this graphic and violent imagery", began looking up cheap flights to Bulgaria and Turkey.
Then in the early hours of 18 September 2014, he left his home to board a flight from Manchester Airport to Bulgaria leaving a letter addressed, "to family", stating his intentions.
Mr Evans said: "He was telling his family in the clearest terms that he was leaving the comforts of his life in the UK in order to fight abroad on behalf of Allah and on behalf of Muslims.
"He did not care what others might think of him and his decision.
"Mr Mahmood planned to travel to Syria with the intention of committing acts of terrorism."
The court heard his family had been unaware of his intentions and on the day he fled had reported him missing to police.
Before he reached Syria, Mr Mahmood's brother persuaded him to come back to the UK via communications over Twitter.
Mr Mahmood's interest in Syria, Jihad and IS was said to have developed over time from 2012, the court heard.
The trial continues.
A man accused of terrorism offences downloaded a video showing a British aid worker being beheaded, a court heard.