The violence in Lukqun, a town in the Turkic-speaking Xinjiang province, which was described in local media as "riots," also left at least three people injured.
Of the dead, 17 people, including 10 police, were victims of the assailants. Police were then able to shoot and kill the 10 attackers.
All information about the attack came from the official state news agency Xinhua, and otherwise kept under wraps by Chinese authorities.
It was not immediately clear what sparked the attacks, but the Uighur Muslim population has consistently strained against Han Chinese "sustained repression and provocation." China, in turn, often blames Uighur activists for provoking violence.
A riot in 2009 that left 200 dead is the most violent of the long-standing unrest in the region.