The soldier from 1st Battalion, The Royal Welsh, was on a foot patrol in Nahr-e Saraj District in Helmand province when he came under small arms fire on Friday.
"He was fatally wounded and despite immediate medical attention could not be saved," the ministry said in a statement, adding that his family had been informed.
Britain has around 9,500 troops in Afghanistan, mainly based in Helmand where they are battling a Taliban insurgency. Britain intends to pull out all its combat troops by 2015.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ