The Royal Marine and his colleagues were providing support to an Afghan National Army patrol in the Khorgajat area of the Nahr-e Saraj (South) District of Helmand province, when they came under small arms fire from close range.
Despite the best efforts of the medics on the ground and extraction by helicopter, he was pronounced dead on arrival at Camp Bastion Role 3 Hospital.
Spokesman for Task Force Helmand, Major Rolf Kurth, said:
"It is my very sad duty to inform you of the death of a Royal Marine from 42 Commando Royal Marines in the Khorgajat area of the Nahr-e Saraj District in Helmand province. The Royal Marine was part of a foot patrol in support of the Afghan National Army, when they came under small arms fire.
"He died as a result of a gunshot wound sustained in the ambush. Our thoughts and prayers are with his family and friends in their time of grief."
Next of kin have been informed and have asked for a period of grace before further details are released.