The worst discipline that the church is authorized to render toward its worst offender is excommunication.
And if he refuses to listen even to the church, let him be to you as a Gentile and a tax collector. (Matthew 18:17)
This means he is not welcome to be a member of the church, nor to partake of the Lord’s supper. It means that Christians love him, not as a brother, but the way Jesus loved sinners. He lay down his life for them, but welcomed them into his band of disciples only if they took up their cross and followed him (Luke 9:23).
Whether this seems harsh depends on what you compare it with. In the Old Testament (God’s law for the earthly government he prescribed for Israel) the penalty was not excommunication but death.
If your brother . . . entices you secretly, saying, “Let us go and serve other gods,” . . . you shall kill him. Your hand shall be first against him to put him to death, and afterward the hand of all the people. (Deuteronomy 13:6-9)
So it is helpful to think of church discipline as a gigantic step of leniency. We don't kill anyone for “serving other gods.” We simply say: “If you do that, you are not part of us. But we will still lay down our lives for you."
In fact, it may be helpful to remember that in the beginning all sin was a capital crime.
In the day that you eat of it you shall surely die. (Genesis 2:17)
From that time to this, God has been lenient. It would be good to ask ourselves, “Do you not know that God’s kindness is meant to lead you to repentance” (Romans 2:4)?