(Does the Holy Spirit Leave the Sinner?) Bible Question.
“I believe (from Acts 2:38 and other passages) that we receive the Holy Spirit when we are baptized. But if a Christian turns back from Christ into a sinful lifestyle, does the Holy Spirit leave him. If so, would the Spirit return, if the person repents and returns to the Lord?”
You are correct that we receive the Holy Spirit when we are baptized into Christ:
“Peter said to them, “Repent, and each of you be baptized in the name of Jesus Christ for the forgiveness of your sins; and you will receive the gift of the Holy Spirit.” - Acts 2:38 (New American Standard Bible)
The apostles said later of the life and death of Jesus which they preached, “And we are witnesses of these things; and so is the Holy Spirit, whom God has given to those who obey Him” (Acts 5:32). When one obeys God by being baptized, he is given the Holy Spirit. In fact, the Scripture clearly say, “. . . But if anyone does not have the Spirit of Christ, he does not belong to Him” (Romans 8:9b).
What happens if a Christian turns back from Christ and into the world of sin? Let us look at another passage:
“This is the message we have heard from Him and announce to you, that God is Light, and in Him there is no darkness at all. If we say that we have fellowship with Him and yet walk in the darkness, we lie and do not practice the truth; but if we walk in the Light as He Himself is in the Light, we have fellowship with one another, and the blood of Jesus His Son cleanses us from all sin.” - 1 John 1:5 – 7
Look at that again carefully. God is light; if we continue to “walk in the Light”, we are in fellowship with God. But if we turn back and again “walk in the darkness “, we are no longer in fellowship with God.
The parallel of fellowship with God and our having the Holy Spirit is too clear to miss. While we walk in the light, the Spirit dwells in us because we are in fellowship with God. If we turn back and walk in darkness, we are no longer in fellowship with God and the Spirit no longer dwells in us.
When one is willing to return to God, he is forgiven and restored to God’s fellowship (Acts 8:22, 23; 1 John 2:1, 2; Hebrews 10:26 – 31). And thus the Holy Spirit returns to that person. If we are not in fellowship with God, the Holy Spirit does not dwell within us. If we are in fellowship with God, we have the Holy Spirit.