China said the allegations were groundless.
China has rejected the claims by US security firm, Mandiant, which said a secret military unit in Shanghai is linked to an attack on some American companies' websites.
Commenting on Mandiant's report, a Chinese military spokesman told Xinhua the country's armed forces had never backed any hacking activities and called the report groundless, both in facts and legal basis.
The spokesman said Mandiant's report did not hold any ground because the report came only came to that conclusion after the discovery that attacks were linked to IP addresses based in China.
Foreign ministry spokesma,n Hong Lei, said that criticism is, "irresponsible and unprofessional, which will not help to solve the problem."
"Firmly opposing cyber attacks, China has established relevant laws and regulations to crack down on hacking," Hong said.
Hong said China has been a major victim of cyber attacks, most of which are from the US.
Last year, the US House of Representatives' Intelligence Committee said that China based telecom firms including Huawei and ZTE should be barred from doing business in US market as they pose a security threat to the country.
Earlier this month, Google executive chairman, Eric Schmidt, claimed that China is "the most sophisticated and prolific" hacker of foreign companies.