This is not the first a U.S. ship has sailed close to the disputed island in the South China Sea, last month the USS Stethem sailed within 12 nautical miles of Triton island in the Paracel archipelago, which is claimed by China, Vietnam and Taiwan.
A Chinese Foreign Ministry spokesman said in a statement that the USS John S. McCain had violated Chinese and global law, undermined Chinese sovereignty and security, and endangered the safety of frontline personnel.
It was the third "freedom of navigation operation" during Trump's presidency.
China's defence ministry said two Chinese warships "jumped into action" and warned the United States ship to leave, labelling the move a "provocation" that seriously harms mutual trust.
The country's Defense Ministry also lambasted the US move, calling it a "provocative act" that had seriously damaged mutual trust.
But Nicole Schwegman, spokeswoman for the U.S. Pacific Fleet, said that USA forces operated in the Asia Pacific region on a daily basis.
"And the point of that is to demonstrate that the United States will continue to fly, sail and operate wherever global law allows".
The Chinese Defense Ministry said Friday that a "joint effort" by China and other countries to address the territorial disputes have yielded "signs of positive developments".
Beijing claims nearly the entirety of the South China Sea, has deployed naval units and has reclaimed land from the sea to expand its presence, sparking protests from its neighbours.
The Pentagon declined to provide any details but said that all operations are conducted in accordance with global law.
Attracted by the strategic military location and the prospect of oil, China, Taiwan, Brunei, the Philippines, Malaysia and Vietnam have all laid territorial claim to the Spratly's and have occupied several islands.
China's "nine-dash line" - its claimed territorial waters that extend hundreds of miles to the south and east of its island province of Hainan - abut its neighbors' claims and, in some cases, encroach upon them.
The whole territory of the South China Sea, which is believed to be extremely rich in energy resources, is disputed.
The United States has criticized China's construction of islands and build-up of military facilities in the sea, and is concerned they could be used to restrict free nautical movement.
It comes amid soaring tensions on the Korean Peninsula over Kim Jong-un's missile programme, and as the United States seeks to push China into more assertively restraining North Korea.
An inside view of the Chinese military over 120 years.
China called it a "serious political and military provocation". "The provocations of the USA would compel China to take measures to increase its defense capabilities buildups".
"China urges the USA to earnestly respect Chinese sovereignty and security interests as well as the joint effort by countries in the region to maintain peace and stability in the South China Sea", the ministry said.