Ebola: $5m vaccine deal announced
It will also license the vaccine by the end of 2017, which would allow Gavi to prepare a global stockpile.
More than 11,000 people have died in the latest outbreak in West Africa.
The sheer scale of the outbreak - the largest in history - led to an unprecedented push on vaccines, which condensed a decade`s work into less than a year.
Merck has led trials of the VSV-EBOV vaccine - which combines a fragment of the Ebola virus with another safer virus in order to train the immune system to beat Ebola.
Early evidence from studies in West Africa suggest it may give 100% protection, although more data is still being collected.
`Wake-up call`
Dr Seth Berkley, the chief executive of Gavi, said: "The suffering caused by the Ebola crisis was a wake-up call to many in the global health community.
"New threats require smart solutions, and our innovative financing agreement with Merck will ensure that we are ahead of the curve for future Ebola outbreaks."
Gavi, an alliance of public bodies and companies committed to saving lives through vaccination, announced the advanced-purchase commitment at the World Economic Forum held at Davos in the Swiss Alps.
The $5m paid to Merck will be offset against any vaccines Gavi orders once the shot is licensed.
The World Health Organization declared West Africa Ebola-free last week, after all of the affected countries had gone 42 days without a case.
But then, just hours later, a death in Sierra Leone was confirmed to be from Ebola.
The WHO has warned more flare-ups are expected.
Dr Jeremy Farrar, the director of the Wellcome Trust medical research charity, said VSV-EBOV had shown "remarkable results" and was one of the "few positive outcomes" to emerge from the epidemic.
He said: "As we saw with the new confirmed case just last week, the Ebola epidemic is likely to have a long tail and it`s possible that several more isolated cases will emerge in the coming weeks and months.
"This vaccine, therefore, could still play an important role in containing any additional flare-ups of this outbreak, as well as being available to help prevent future epidemics."