The kidnappers took two people hostage late last Wednesday in Pishan County in the far southern part of Xinjiang, close to the borders of India and Pakistan, state media reported.
Seven of the suspects were shot dead and four were wounded and caught, while the two hostages were freed.
One policeman was also killed, state media said.
"The people in question were trying to cross the border to go overseas for the purposes of so-called holy war," Chinese Foreign Ministry Spokesman Hong Lei told a daily news briefing.
"They kidnapped some herders, who took the opportunity to escape and tell the public security authorities, who demanded (the kidnappers) abandon their plans," he said.
"While this was happening they cruelly murdered some Chinese policemen and also caused many injuries. This is very obviously a violent terrorist incident," Hong said.
He declined to comment on whether the kidnappers had links with Pakistan.
China has in the past accused militant Uighurs of working with supporters in Pakistan to plan attacks in Xinjiang.
Pishan is a heavily Uighur area of Xinjiang.
The Uighurs are a Turkic-speaking Muslim people who call Xinjiang home, many of whom chafe at government controls on their culture and religion.
However, exile groups and human rights activists say China overstates the nature of the threat posed by militants in Xinjiang to justify its harsh policies.
The region has been beset by ethnic strife and sometimes violent unrest.
In July 2009, Uighurs rioted against Han Chinese residents in Urumqi, the regional capital of Xinjiang, killing at least 197 people, mostly Han, according to official estimates.
Xinjiang sits astride south and central Asia. China sees it as a bulwark in this volatile part of the world, making it all the more jumpy about unrest.
In September, courts in Xinjiang sentenced four people to death for violence in two cities over the summer in which 32 people were killed.
The government blamed the incidents in Kashgar and Hotan - both in the majority Uighur southern part of Xinjiang - on religious hardliners and separatists who want to establish an independent state called East Turkestan for their people.