How to optimally allocate COVID-19 vaccines and scarce public goods is a crucial and sensitive question to scholars, policy-makers, and practitioners. The ethical dimensions and principles of vaccine allocation between groups are widely agreed upon, whereas the ethical dimensions and principles of vaccine distribution between countries at the peak of the COVID-19 pandemic are highly controversial. This article aims to investigate how vaccines were globally allocated across countries and propose an optimal allocation mechanism for vaccines and scarce public goods. The results show that, to a certain extent, the global allocation of COVID-19 vaccines was fair and effective. Countries with more cases and deaths obtained more vaccines and vaccinations. Wealthier countries might receive more vaccinations but also suffer more severe consequences of COVID-19. Though COVAX could miss its initial vaccine delivery targets, the facility should be considered successful in its core goals and plays a critical role in controlling the pandemic. The study proposes a fair and effective mechanism of vaccine allocation that combines the roles of markets and interventions of international organizations and national governments with three degrees: emergency, priority, and market.