Argentina sold €2.5 billion ($2.8 billion) of debt on Wednesday, a swift return to foreign investors for a country that was until recently locked out of international capital markets.

The deal comes on the heels of Argentina’s $16.5 billion issue in April, a record amount for an emerging market nation. Yield-hungry investors have been piling into emerging-market credit amid low and negative yields elsewhere, spurring demand for bonds from Ghana to Brazil.

But...