The 39 were given prison sentences of up to 15 years, the state run China News Service (CNS) said, adding that several had "organised, led and participated" in terrorist organisations.
In the past year Xinjiang has seen an increase in violent clashes which Beijing blames on organised terrorist groups seeking independence for the region.
Critics say the security threat in Xinjiang is exaggerated by Beijing to justify hard-line measures, and instead point to economic inequality and cultural and religious repression of Uighurs as causes of unrest.
The 39 were detained on suspicion of "spreading violent terrorist videos", CNS said. The names of several of the accused suggested they were ethnic Uighurs.
The heaviest sentences, of 14 and 15 years, went to two suspects accused of encouraging "holy war", it said.
Some of the suspects had been found to have "incited ethnic hatred, ethnic discrimination", while others had been involved in the illegal manufacture of firearms, it added.
Six courts handed down the sentences on Tuesday, the report said, including one in the western county of Aksu which has seen a number of violent clashes in the past year.
State media said earlier this month that more than 200 people had been held in a crackdown on "terrorist" videos.
Assailants armed with knives and explosives carried out an attack at a railway station in Xinjiang's capital Urumqi in April, killing one person and wounding 79 as President Xi Jinping visited the region.
Chinese authorities blamed the attack -- in which two assailants also died -- on an extremist group it calls the East Turkestan Islamic Movement.
China's courts are subject to heavy influence from local authorities, access to defence lawyers is limited and confessions are sometimes extracted through torture.
Information about Xinjiang, a vast and resource-rich region bordering Central Asia, is difficult to verify independently, with foreign and local journalists subject to heavy restrictions.