1 Corinthians 6:19–20
19 Or do you not know that your body is a temple of the Holy Spirit within you, whom you have from God? You are not your own, 20 for you were bought with a price. So glorify God in your body. ESV

So track with me as we cruise through Paul’s epistle to the Corinthians to understand the context of our memory verse. Written to the church in Corinth, Paul is addressing problems that had crept in quickly after his departure. They had divisions that he addressed in chapters 1-4. He addressed them as “the church of God that is in Corinth, to those sanctified in Christ” (1:2) and yet in regards to their first correction in light of divisions he says “I brothers, could not address you as spiritual people, but as people of the flesh, as infants in Christ.”(3:1) Paul is confident of their sanctification in Jesus, yet he does not hesitate to confront their lack of acting like it.
The second issue of correction was of sexual immorality, this is in chapters 5-7. This is where we find our memory verse. It’s handy that we try and section Paul’s thought out but you’ll notice in his transition from chapter 4 to 5 he has set the stage for some massive doctrinal challenges. In chapter 4 verse 5 he states “Therefore do not pronounce judgment before the time, before the Lord comes, who will bring to light the things now hidden in darkness and will disclose the purposes of the heart. Then each one will receive his commendation from God.” It, at face value seems that we are not supposed to judge but as you will soon find out this is not the case. Paul states in chapter 4 vs 6b that he has applied all his advice to himself and follows up that his listeners “that you may learn by us not to go beyond what is written” (6b). This will be very significant very shortly as we move into the section on the correction of their sexual immorality. In the end of chapter 5 Paul states some maxims that don’t get quoted often. Starting in verse 9 he states “I wrote to you in my letter not to associate with sexually immoral people – not at all meaning the sexually immoral of this world, or the greedy and swindlers, or idolaters, since then you would need to go out of the world. but now I am writing to you not to associate with anyone who bears the name of brother if he is guilty of sexual immorality or greed, or is an idolater, reviler, drunkard, or swindler – not even to eat with such a one. For what have I to do with judging outsiders? Is it not those inside the church whom you are to judge? God judges those outside. ‘Purge the evil person from among you’”. (5:9-13) Evidently, in regards to one who bears the name of brother, we are to judge. How? According to what is written (6b).
Paul then goes on to explain how lawsuits are very revealing of the heart and do not reflect well on those professing the name of Christian (6:1-8). He transitions with who will not inherit the kingdom of God in verse 9b “Do not be deceived: neither the sexually immoral, nor idolaters, nor adulterers, nor men who practice homosexuality, nor thieves, nor the greedy, nor drunkards, nor revilers, nor swindlers will inherit the kingdom of God.” He has established that those who are worshipping money along with the sexually immoral will not inherit the kingdom. This is where he launches how our body really belongs to the Lord and our memory verse states why. “Or do you not know that your body is a temple of the Holy Spirit within you, whom you have from God? You are not your own, for you were bought with a price. So glorify God in your body.”
Since we know Scripture comments on Scripture Paul states a similar imperative in his letter to Timothy: “Let everyone who names the name of the Lord depart from iniquity.” (2 Ti 2:19)