Ephesians 4:30 And grieve not the holy Spirit of God, whereby ye are sealed unto the day of redemption.
In the same way that man has a spirit, so God has a spirit.
1 Corinthians 2:11 For what man knoweth the things of a man, save the spirit of man which is in him? even so the things of God knoweth no man, but the Spirit of God.
We understand what it means to be grieved in our spirit.
Daniel 7:15 "I, Daniel, was grieved in my spirit within my body, and the visions of my head troubled me.
Isaiah 54:6 For the LORD hath called thee as a woman forsaken and grieved in spirit…
In the same way that we can be grieved, so God can be grieved.
Genesis 6:6 And the LORD was sorry that He had made man on the earth, and He was grieved in His heart.
Psalms 95:10 For forty years I was grieved with that generation, And said, ‘It is a people who go astray in their hearts, And they do not know My ways.’
Because God is holy, his spirit is holy.
In the Old Testament the Jews rebelled against God and in so doing grieved the holy spirit of God
Isaiah 63:10 But they rebelled and grieved his holy spirit; therefore he became their enemy; he himself fought against them.
God sent prophets to them with messages inspired by his holy spirit and they ill-treated them. Stephen reminds them of this.
Acts 7:51 "You stiff-necked people, uncircumcised in heart and ears, you are forever opposing the Holy Spirit, just as your ancestors used to do.
The translators who hold the false doctrine of the trinity suppose that the holy spirit of God is a person and so capitalise the words.
We have an example and the consequence in the case of Ananias and Sapphira who lied to the apostles and so lied to God.
Acts 5:1 But a certain man named Ananias, with Sapphira his wife, sold a possession. 2 And he kept back part of the proceeds, his wife also being aware of it, and brought a certain part and laid it at the apostles’ feet. 3 But Peter said, "Ananias, why has Satan filled your heart to lie to the Holy Spirit and keep back part of the price of the land for yourself? 4 "While it remained, was it not your own? And after it was sold, was it not in your own control? Why have you conceived this thing in your heart? You have not lied to men but to God."
When we ‘put on’ Christ we are expected to live by his precepts. This is termed ‘walking in the spirit’.
Galatians 5:16 I say then: Walk in the Spirit, and you shall not fulfill the lust of the flesh.
Galatians 5:25 If we live in the Spirit, let us also walk in the Spirit.
If we walk in the spirit, God’s holy spirit effectively lives in us.
Romans 8:11 If the Spirit of him who raised Jesus from the dead dwells in you, he who raised Christ from the dead will give life to your mortal bodies also through his Spirit that dwells in you.
We grieve the holy spirit of God when we, who have put on Christ, say and do things which are contrary to the commandments of Jesus Christ.
I hope you find the helpful,