Statistics Canada said the 0.8 percentage point decline from April's level was mostly attributable to declines for gasoline prices.
The overall energy index fell by 1.6 per cent in May, the agency said. That's the first time that's happened since October 2009.
After 22 consecutive annualized increases, pump prices fell 2.3 per cent in April. And natural gas was in freefall from already low levels, with prices down by 16.6 per cent this May compared with a year earlier.
Food prices up 2.5%
If energy costs were stripped out, the overall consumer price index would have been 1.7 per cent higher in May. In April, it would have been two per cent higher.
The Bank of Canada's core index rose by 1.8 per cent, a drop from 2.1 per cent the month prior.
"While this is good news overall, I wouldn't get too carried away thinking we're headed for deflation," said Doug Porter, deputy chief economist with BMO Capital Markets.
"There were some special timing factors that made the inflation numbers look more benign than is the reality. But inflation at this point is the least of our worries … the pressure on the Bank of Canada to move on rates is vapourizing."
The main upward contributors to the rise in the CPI were higher prices for food and shelter. Prices for food purchased from stores increased 2.5 per cent in the year ended in May.
Overall, seven of the eight major components tracked by Statistics Canada rose in May, but many by less than a month earlier.
Regionally, consumer prices increased in every province and territory, but in each case, the pace of gain was slower than it was in April.