The suspect used unspecified weapons to injure a police officer in the city of Urumqi on Monday night, the official China News Service reported. Officers who arrived at the site shot the attacker dead.
The injured officer, who was 29, later died, the news agency reported.
The report did not identify the ethnicity of the assailant, but it was the latest in a series of attacks pointing to growing unrest in the sprawling region.
Xinjiang is home to a simmering rebellion against Chinese rule among parts of the native Turkic Uighur population who chafe against Beijing's rule. Recent clashes, including an attack on police last month, have left dozens of people dead.