Q. Does the Holy Spirit leave us when we die? Does giving up the ghost mean separating from the Holy Spirit or merely separating our body from our spirit? What about all the people that have died? Do they get the Holy Spirit back when they are resurrected, or were they never separated?
A. The Holy Spirit was sealed within us as a deposit guaranteeing our inheritance (Ephes. 1:13-14). He was also sent to us as a counselor to compensate for the fact that Jesus returned to the Father (John 16:7). Once we die we begin to receive our inheritance and the Holy Spirit will be released. After the rapture/resurrection we’ll be in perfected bodies and will know as we’re known, so we’ll no longer need the indwelling Holy Spirit in the way we do now. Our spirit will be one with God.
The phrase “giving up the ghost” refers to the departure of the dead person’s spirit not the Holy Spirit.