The settlement caps the UK order from GSK at 34.8 million doses including those already received. It follows the cancellation of a similar contract with Baxter in February 2010.
Unused vaccine will be kept in reserve in case of a third wave, although the government will donate 3.8 million doses to the WHO to help in Africa.
The government will also continue to immunise remaining patients in priority groups, such as pregnant women, who remain at risk from the virus.
The DoH also agreed to buy other GSK products, including the H5N1 bird flu vaccine and courses of antiviral Relenza.
Health secretary Andy Burnham, said: ‘I am pleased we have reached an agreement that is good value for the taxpayer and means that the DoH has retained a strategic stockpile to protect the UK population without incurring a cancellation fee.
‘This both protects the public purse and ensures the UK remains at the forefront of pandemic preparedness worldwide.'
Mr Burnham said the probability of a H5N1 pandemic, which is likely to be more severe than swine flu, has not diminished.
He said: ‘This agreement means we are ready if a 'bird flu' pandemic occurred, and allows us to maintain our status as one of the most prepared countries in the world.'
Scotland's cabinet secretary for health and wellbeing Nicola Sturgeon said: 'This deal means that the UK will save approximately one third of the original value of the orders with GSK.'
She added: 'I am pleased that the four nations have reached an agreement that is good value for Scotland and means that we have been able to retain a strategic stockpile to protect the population without incurring a cancellation fee.'
Simon Jose, general manager of GSK UK, said: ‘Understanding of the H1N1 pandemic has significantly evolved since the declaration by the WHO last June and we recognise that governments' needs and public health priorities are changing.
‘We are committed to working with them to respond to their needs as the pandemic evolves and find appropriate and fair solutions. In line with these principles, we are pleased to have reached a settlement, which has been mutually agreed as representing fair value for the UK government and for GSK.'