The four drove a vehicle into the compound in Karakax county, and set off explosives that killed one person and injured three others, they said. State media said it was a terrorist attack.
The area, predominantly Muslim Uighur, has suffered years of unrest.
The authorities blame the history of violence on Islamist militants.
Human rights and exiled Uighur groups accuse the government of repressing the Muslim community.
State news agency Xinhua did not specify whether the four people were killed by authorities on the spot or later in the day.
Last month Chinese authorities began confiscating passports from people in the region, saying it was a move to combat violence.
Uighurs, which makes up about 45% of Xinjiang's population, have often complained about having restrictions put on their freedom of movement.

The 26-year-old served a provisional 30-day suspension after testing positive for a 'fat burner' in March.
Sakho admitted taking the substance, but Uefa had to investigate whether it was actually prohibited.
Its control, ethics and disciplinary body dismissed the case after a hearing including experts from World Anti-Doping Agency-accredited laboratories.
"I am happy that this is finally over," Sakho said. "It's been a difficult time for me but I knew I had done nothing wrong.
"I am looking forward to getting back in the team and playing again."
Centre-back Sakho's failed test followed Liverpool's Europa League last-16 second-leg tie against Manchester United on 17 March.
He was eligible for selection for his country for Euro 2016 but was left out of the squad.
Liverpool said in a statement: "We are pleased for Mamadou that he can now resume his playing career."

Webb had been linked with the role in 2015, with Blatter suggesting at a conference in the Caribbean on Monday that he could be replaced by Webb "in the near future".
But Cayman Islands native Webb said: "No, definitely not. That is not my intention or my objectives at this time."
Blatter, who has led Fifa since 1998, was speaking off the cuff before a speech to mark the opening of a Concacaf sport summit. The Swiss was introduced incorrectly to an audience of regional political leaders and confederation delegates as "Fifa's vice-president" by a local media officer.
Total number of presidents: 8
Current president: Sepp Blatter, since 1998
Previous president: Joao Havelange from 1974 to 1998
Longest time spent in office: Jules Rimet - 33 years from 1921 to 1954
Number of English presidents: 3 - Daniel Burley Woolfall (1906-1918), Arthur Drewry (1955-1961), Stanley Rous (1961-1974)
Blatter, 77, stepped up to the lectern and replied to the mistake by telling the media officer and assembled guests: "I think you're a prophet."
He then added that there may be a new Fifa president in "the near future" and the next president "could be Jeffrey Webb".
After receiving applause, he added: "This would not mean I would be vice-president. Once you have been a horse you don't go back to the stable."
Sources close to Fifa have told BBC Sport that the comments should not be taken as a decision by Blatter that he will not stand as a candidate in the next election, scheduled for May 2015, and that all options are still open to him.
Blatter told Uefa delegates in 2011 that this would be his final term of office but has this year given strong indications that he may seek a fresh mandate.
The comments are the clearest indication so far that Uefa president Michel Platini - considered by many observers to be his most likely successor - is not the man Blatter wishes to see in power after he has left the role.
Platini has yet to decide if he will stand in the 2015 election saying recently that he wanted more time to consider the matter.
Webb, 49, was elected president of Concacaf in May 2012 following the acrimonious departures of former president Jack Warner and general secretary Chuck Blazer.
Now one of seven Fifa vice-presidents, Webb started his time in football governance as president of the Cayman Islands Football Association in 1991.
Chinese police have shot dead four people who attacked a Communist Party building in western Xinjiang province, local government officials say.
[NEXT_CONCEPT]
Liverpool and France defender Mamadou Sakho has had a doping case against him dismissed by Uefa.
[NEXT_CONCEPT]
Confederation of North, Central American and Caribbean Association Football leader Jeffrey Webb says he has "no intention" of replacing Sepp Blatter as Fifa president.