This paper develops a dynamic two-country model with an international public good, the stock of which has a positive effect on the private-goods sectors’ productivity in each country and the evolution of the stock is determined by each country’s voluntary contribution. It is shown that the country with a higher contribution technology becomes an exporter of the good which is more dependent on the stock of international public good. It is also shown that if the countries act cooperatively, the dynamics of the stock of international public good and its shadow price under free trade coincide with those under autarky, although the paths of each country’s contribution level are different. Specifically, the contribution level in the country with a lower contribution technology becomes smaller under free trade than under autarky, and it is shown that this country unambiguously gains from trade. In the noncooperative regime, free trade achieves a larger steady-state stock of international public good than autarky.