Shanghai's consumer price index, a main gauge of inflation, rose 4.6 percent year on year in May, mainly lifted by surging food prices.
It marked the second consecutive month with a CPI growth of over 4 percent year on year, and the increase was faster than the national figure, which was 2.1 percent, the city's Bureau of Statistics said on Tuesday.
The price of consumer products rose 7.5 percent in May, while that of services increased 1.4 percent from a year earlier.
Food prices soared 19 percent year on year. The prices of vegetables and eggs rocketed by 50.8 percent and 52.3 percent, respectively.
Dried and fresh fruit prices and prices of aquatic products both rose at a faster pace than the previous month, up 35.9 percent and 19.6 percent, respectively. Meat prices picked up 3.7 percent year on year, reversing the decline in April.
In other major sectors, transportation and communication prices went up 4 percent in May. The price of household goods and services, health care, education, culture and entertainment, housing, and other supplies and services rose 2.5 percent, 2.4 percent, 2.3 percent, 1.2 percent and 0.3 percent, respectively.
Clothing prices edged down 0.4 percent.
For the January-May period, the city's CPI was 2.8 percent higher than the same period last year.