The man, Anis Laraba, has Algerian heritage and was born and raised in Denmark.
He was an 18-year-old upper secondary school student when he travelled to Syria in 2013 and joined the armed group.
He travelled to the Middle Eastern country with a second Danish citizen, Enes Cifti, who has been convicted of similar offences.
Laraba was found to have participated in battle on the side of Isis, thereby breaching Danish terror laws.
Cifti was the first Danish-born person to be stripped of his passport when his case was taken to the Supreme Court in November this year, with Laraba now receiving the same punishment.
Glostrup City Court found that the 22-year-old had stayed in Syria for nine months up to April 2014, when he asked his mother to buy him a ticket back to Denmark.
The five-year custodial sentence, which is relatively long, was based on the long stay in Syria as well as Laraba's participation in the fighting itself.
“It is an aggravating circumstance that he stayed in Syria for nearly nine months, where his activities included training in the use of weapons and fighting in battle,” the presiding judge said as he gave the verdict on Wednesday.
The court also highlighted that the 22-year-old had been accepted to study at an Islamic school in the Saudi Arabian city of Medina at the time of his arrest, and that he has family in Algeria.
As such, the court found it reasonable to believe the man’s future lay in Algeria, rather than in Denmark, where his parents and siblings live.
He was also linked to a radical Danish group known as Kaldet til Islam (Called to Islam).
“He is badly integrated and has no time for democracy,” prosecutor Natalja Fryd Lindberg said during the trial.
The 22-year-old has denied the charges throughout and has appealed the sentence to the High Court.
READ ALSO: Denmark charges 26-year-old man accused of joining Isis