The consumer price index (CPI), a key gauge of inflation, jumped 4.0 percent from a year ago, in line with analyst expectations and down from a 4.9 percent rise in April.
The data comes as Federal Reserve officials are set to begin a two-day policy meeting on Tuesday, with the figures expected to have a bearing on their interest rate decision at the end of the gathering.
While the US central bank has embarked on an aggressive campaign of rate hikes, lifting the benchmark lending rate 10 times in a row since early last year, it is widely anticipated to pause this week.
But analysts caution that Fed policymakers are likely looking for a more sustained trend of cooling growth before they end their cycle of rate hikes.
On a monthly basis, the CPI rose 0.1 percent in May, decelerating from 0.4 percent in April, the Labor Department said.
Excluding the volatile food and energy components, consumer inflation was up 5.3 percent over the last 12 months.