No doubt, it will become a question in many a reader's mind what to do about 1 Corinthians chapter 5 in which Paul scolds the Corinthians for their lack of action against an immoral brother and then describes putting this one out of fellowship. He finishes the thought explaining that his instructions on not associating with "immoral" people did not mean the unenlightened masses of people who are without Jesus, but that he fully intended that those within the church be judged within the church.
How is Paul's action and subsequent explanation reconciled with other New Testament teaching on judgment?
In my view, this is not nearly as difficult as it appears on the surface. Like many other areas, however, in an attempt to practice this teaching within our modern context there are often muddying factors which leave a bad feeling in the soul over what is done "in the name of the Lord."
If the immoral brother had had the facts presented to him without condemnation, then he responded with conviction including confessed repentance that his behavior was abhorrent, would Paul have needed to address the issue? No, because the stain of the sin would have come under the blood covering of the Crucifixion. There is a hermeneutic harmony of Jesus' teaching about judging with right judgment in the Sermon on the Mount, Jesus words about confronting a brother in Matthew 18 and Paul's instruction in 1 Corinthians. There exists an authorized judgment by a group of believers which is exercised against immorality defiantly held by someone professing Christ. (Other judgments, i.e. not taking a brother to court in 1 Cor. 6, are also the domain of the group, but that is not part of this post.)
The "muddying" factors that cloud this action include refusal to so judge, the process of the decision when it is made and whether or not the ones making the decision are actually moving in self-righteousness. Some groups of believers never address the continuing practice of immorality without repentance. The opposite pole is a group which addresses the issue with a cold heart of legalism, thus enduring a judgmental spirit that Jesus taught so clearly against. I was in a church once that turned someone "over to Satan." In fact, I observed two separate instances when several people were so condemned. I believe these people were mistreated, and God's intent to protect the body from a leavening effect of sin was missed.
The failing? The leadership made the call and brought it before the congregation as a finalized decision. Looking at Paul's instruction extrapolated further in chapter 6 and considering Jesus' teaching in Matthew 18 against the occurrence of a refusal of someone to reconcile with the truth, it is a judgment by the whole family which is authorized and not an action of a few hierarchical leaders.
I think more often, much more often, a confrontation with sin results in repentance. The strict action of shunning is rarely required. The rub is we do not have the patience to forgive 7 x 70 and continue to love keeping no record of wrong. That will be the next topic. :^)