Foreign investment in China reached a record $126 billion in 2015, according to new official data.

In the first 11 months of the year, China took in $114 billion in non-financial investment, up 7.9 percent year-on-year, the Ministry of Commerce (MOC) said in a statement on Tuesday.

Nearly 24,000 foreign-funded enterprises were founded in the first 11 months, 11 percent more than in the same period of 2014.

Guided by the Chinese government, an increasing amount of foreign capital flowed to the service sector and advanced manufacturing, according to the statement.

Investment from major countries kept stable in 2015 and China's free trade zones with preferential policies were major factors in the foreign capital inflow.

"Foreign investment increased at a relatively fast speed with improving quality against the background of a fierce global fight for capital and persistent downward pressure," said the MOC.

In 2014, China took in $119.6 billion in non-financial foreign investment, overtaking the United States for the first time as the world's largest foreign investment receiver.