Consumer prices in May posted their largest annual decline in 59 years, as the sharp drop in demand for goods continued to keep inflation in check.

The Labor Department said Wednesday its consumer-price index rose 0.1% in May from April. Compared to a year earlier, the CPI was down 1.3%, the largest decline since 1950.

Much of that decline...