Luther was never arrested. However, as a punishment he was excommunicated.
On 15 June 1520, the Pope warned Luther with the papal bull (edict) Exsurge Domine that he risked excommunication unless he recanted 41 sentences drawn from his writings, including the 95 Theses, within 60 days. That autumn, Johann Eck proclaimed the bull in Meissen and other towns. Karl von Miltitz, a papal nuncio, attempted to broker a solution, but Luther, who had sent the Pope a copy of On the Freedom of a Christian in October, publicly set fire to the bull and decretals at Wittenberg on 10 December 1520, an act he defended in Why the Pope and his Recent Book are Burned and Assertions Concerning All Articles. As a consequence, Luther was excommunicated by Pope Leo X on 3 January 1521, in the bull Decet Romanum Pontificem.