Thegan of Trier (or Degan of Treves) (before 800 - ca. 850) was a Frankish Roman Catholic prelate and the author of Gesta Hludowici imperatoris which is a principal source for the life of the Holy Roman Emperor Louis the Pious, the son and successor of Charlemagne.
Very little is known of Thegan's life; he appears to have come from a noble Frankish family in the middle Rhine-Moselle region. He may have been educated at Lorsch. All that is certain is that by 825 he was auxiliary bishop of Trier and probably praepositus of the monastery of St. Cassius in Bonn. He was also a warm friend of Walafrid Strabo, who was the earliest editor of Thegan's Gesta and divided it into chapters, just as he did with Einhard's Vita Karoli. Walafrid also gave it the name by which it is known: Gesta et Laudes ("Deeds and Praise"), which he mentions in his prologue. 
Some poetry and a single letter from Thegan survive. This letter is written to one Hatto who was a count in the Rhine region of Kreuznach, and an important broker in the effort to reconcile Louis the Pious with his son Louis the German in the mid-830s. This concern to promote accord between Louis and his son is similarly evident in the Gesta.
Thegan died between 848 and 853.
Thegan wrote his history of Louis the Pious, translated as "The Deeds of Emperor Louis," in 836-7. The text is a narrative in unpolished Latin, as judged by the standards of the day, written with hortatory intent and based on personal knowledge and communication with friends. Prefaced by a brief prologue by Walafrid Strabo, the Gesta begins with an account of Saint Arnulf of Metz, describes the vicissitudes of the brothers of Louis and gives a more detailed account of Louis' reign during the years 814-835. The later narrative is probably a continuation by another author.
The account is clearly partisan. The merits of Louis himself are exalted, though his councillors and Louis' poor judgement in taking their advice, are denigrated, while the actions of Louis' son Lothair and of a number of bishops, especially Bishop Ebbo of Reims, are severely criticised. So virulent is Thegan's depiction of Ebbo that Walafrid feels it necessary to make excuses for it in his short prologue.
Thegan's strong dislike for Ebbo has been attributed by most modern historians to Ebbo's low birth and his contribution to the rebellion which deposed Louis briefly. More recently, Tremp has suggested that Ebbo was making an attempt to reform the chorepiscopate and that this was an additional reason that he incurred Thegan's hatred. Whatever the reason behind it, it is clear from the text that Thegan's dislike for Ebbo is of a very personal nature.
The text was not widely read during Thegan's lifetime but became far more popular during the reign of Charles the Bald. Rosamund McKitterick has suggested that this can be seen as part of the preoccupation of later Carolingian kings to construct a historical image for themselves. Indeed, Thegan's text is most frequently found as part of manuscripts containing texts such as the Royal Frankish Annals, genealogies of the Carolingians and a history of the Trojans, and very often the Vita Hludovici of the anonymous author known as The Astronomer.
The Gesta has been translated into German by Ernst Tremp in the series Monumenta Germaniae Historica: Scriptores in Rerum Germanicarum in usum Scholarum separatim editi. An English translation is available in the volume Carolingian Civilization: A reader by Paul Dutton.