The Danish soldier was seriously injured during an exchange of fire and later died in a nearby hospital in Afghanistan, Press TV reported.
Denmark's army said in a statement on Saturday that the soldier, killed in Helmand province, was on patrol near a military base when his unit came under attack.
"It is with great grief that I must announce that this morning we lost a Danish soldier," the military statement said.
His death brings the number of Danish soldiers killed in Afghanistan since Denmark joined the US-led operations in the war-torn country nine years ago to 32.
The Scandinavian country has more than 700 soldiers serving in the US-led forces in Afghanistan.
The developments come as the security situation keeps deteriorating in Afghanistan with US-led forces being killed by Taliban militants on a nearly daily basis.
According to official figures, more than 2,100 US-led soldiers have been killed in Afghanistan since the US-led invasion of the country.