The companies did not disclose the financial details of the agreement, but said terms were based on the volume of doses and the timing of the delivery.
Pfizer and BioNTech will not receive any money from the government unless their vaccine succeeds in large clinical trials and can be successfully manufactured.
The Pfizer/BioNTech candidate is one of the most advanced of over 150 vaccines being developed against COVID-19.
It is the biggest deal to date under Operation Warp Speed, intended to accelerate the development, manufacturing, and distribution of coronavirus vaccines, therapeutics, and diagnostics.
"The hunt to find a vaccine is a truly global endeavour and we are doing everything we can to ensure the British public get access to a safe and effective coronavirus vaccine as soon as possible," said Sharma.
The candidates, BNT162b1 and BNT162b2, are the most advanced of the at least four vaccines being assessed by the companies in ongoing trials in the United States and Germany.
Early data from the German trial of BNT162b1 are expected to be released in July, the companies said.