The attackers, who were apparently from the region`s mainly Muslim Uighur minority, set fire to the building in the remote city of Hotan in the far northwest and took a number of hostages, the report said.
Two of the dead were hostages, one was a security worker and the fourth was the police officer, the report said, citing sources at the Ministry of Public Security.
It said police had shot and killed an unspecified number of attackers, but gave no further details and said the situation had now been brought under control.
Police "quickly converged on the scene and shot a number of rioters while freeing six hostages", the report said, citing the ministry sources. The injured -- including a security worker -- were taken to hospital, it added.
A spokesman for the German-based World Uighur Congress said the clashes erupted after a group of Uighurs tried to take away a number of police officers so they could demand the release of family members who had been arrested.
"The Uighurs rushed to the police station to take away some police officers and ask them to release the Uighurs who had been arrested," Dilxat Raxit told AFP by telephone.
"A clash ensued. Police then opened fire. Thirteen people have been detained by police, and one was seriously injured."
Raxit said women and students were among the group, and urged Chinese police to "respect the political demands of Uighurs", pointing to religious restrictions in Hotan and the removal of land from Uighur residents.
The far-western Xinjiang region, whose Uighur minority has seethed under Chinese rule for decades, has experienced several violent bouts of unrest in recent years.
The worst came in July 2009 when Uighurs in the regional capital Urumqi vented decades of resentment with savage attacks on members of China`s dominant Han group.
Han mobs took to the streets in the following days seeking revenge, but a second bloodletting was averted.
Nearly 200 people were killed and 1,700 injured in all, the government says, in the worst ethnic violence to hit China in decades. (*)