Direct Answer
The Origen article argues that Origen was not actually excommunicated by Demetrius. The article says some later histories state this, but that Eusebius reports no such thing.
What the Controversy Was About
The dispute began with church order and jurisdiction, not with a clear charge that Origen had abandoned the faith. the article says Origen preached in churches in Palestine while he was still unordained, and that Demetrius of Alexandria was displeased when he heard about it. Later, when Origen traveled through Caesarea, bishops in Palestine ordained him as an elder. Demetrius refused to recognize that ordination and wrote to other bishops, including the bishop of Rome, trying to persuade them not to recognize it either.
That is a serious controversy, but it is not the same thing as excommunication. the article's wording is explicit: 'Eusebius reports no such thing.'
Why People Say He Was Excommunicated
The confusion likely comes from the strength of Demetrius's opposition. If a bishop refuses to recognize a man's ordination and urges other bishops to do the same, later readers can easily flatten that into 'he was excommunicated.' the article argues that this goes beyond the evidence.
What Happened Afterward
Origen did not disappear from Christian ministry. the article says he left Alexandria, settled permanently in Caesarea, and served there as a faithful elder until the end of his life about twenty years later. The article also says he continued to be recognized as a teacher and defender of orthodoxy throughout the church.
Careful Conclusion
So the better answer is not, 'Origen was excommunicated because of heresy.' the article's source says the opposite: the excommunication claim is incorrect, the real dispute concerned ordination and authority between Alexandria and Palestine, and Origen continued to serve in Caesarea until his death.
Read the Evidence Yourself
The main source for this answer is the Origen article linked below. Readers should compare the short answer with the source excerpt and the full linked article before treating the question as settled, especially where later summaries of Origen disagree. For broader context on early Christian figures, see Who's Who in the Early Church?.