From a year earlier, foreign investment rose 24.1 percent to $9.4 billion in July, the largest gain since March 2011, the Commerce Ministry said.
While the gain was significant, "what's more important, FDI gains in June and July were in line with a pickup in momentum since February, which truly reflected that global investors are confident in China," spokesman Shen Danyang said.
In June, FDI was up 20.1 percent from the previous year, the China Daily reported Saturday.
For the January through July period, FDI flowing into China reached $71.4 billion, up 7.1 percent from the first seven months of 2012.
From January through July, the inflow of investment from 10 Asian nations and regions rose 7.7 percent to $61.74 billion. That included a 612.6 percent increase from Thailand.
Over the same period, FDI from the European Union was up 16.7 percent and from the United States it was up 11.4 percent.
"Some investors have robust confidence in the country's economic prospects," said Lian Ping, chief economist at the Bank of Communications Ltd.
How long the trend would continue was uncertain, Shen said.
"It's not definite that FDI will keep up this pace in the following months this year," Shen said.
Pregnant Mila Kunis wins 'Best Villain' at MTV Movie Awards
Pistorius testifies he didn't consciously pull trigger when he shot girlfriend