The blast on Wednesday hit the troops from 1st Battalion Irish Guards as they returned from an operation with Afghan and Danish troops in the Nahr-e Saraj District of Helmand province, it said.
The deaths bring to 362 the number of British troops killed since operations in Afghanistan began in October 2001 to topple the Taliban regime. They were the 12th and 13th British fatalities this year.
During the mission they had "successfully disrupted insurgent activity and searched a number of compounds," said Lieutenant Colonel Tim Purbrick, spokesman for Task Force Helmand.
"On completion of the operation their patrol had just left an Isaf (International Security Assistance Force) base in order to return to their own camp -- to commence their handover to the next unit before they were due to return home in six days -- when the vehicle in which the two soldiers were travelling was struck by an improvised explosive device," he said.
"Both men were recovered to an Isaf base however, tragically, both had lost their lives. Our thoughts and prayers are with their families and friends."
A soldier died in hospital in Britain on Friday from injuries sustained in a bomb blast in the same district last week.