Paul gave a similar instruction to the Thessalonians:
1 Thessalonians 5:19 ESV
Do not quench the Spirit.
The Cambridge Bible Commentary explains:
But the command, “Quench not the Spirit,” is universal. Whatever obstructs or disparages His work in the souls of men—whether in others, or in ourselves—is thus forbidden. It is a strange and awful, but very real power that we have to “resist the Holy Spirit” (Acts 7:51).
Believers have the ability to act in such a way as to quench and/or resist the Holy Spirit. As others explain sin or failing to obey are actions by which believers will resist and or quench the Holy Spirit. In addition, we should add failure to use the gifts of the Spirit. As Paul explains, gifts are given for the benefit of the Church, and failing to use them would be resisting the Holy Spirit and quenching His work.
The meaning in Ephesians is the same, but stated in different terms:
And do not grieve the Holy Spirit of God, by whom you were sealed for the day of redemption.
It seems straightforward that resisting or quenching would also grieve the Holy Spirit.
The question then is why did Paul restate the obvious using grieve, λυπέω, rather than quench, σβέννυμι, or resist, ἀντιπίπτω?
Paul and λυπέω
λυπέω is used 26 times in the New Testament; and 15 times by Paul:
Every use describes the physical state of being grieved, sorrowful, sad, or in pain. This is particularly true of Paul's use of the term. For example:
For if your brother is grieved by what you eat, you are no longer walking in love. By what you eat, do not destroy the one for whom Christ died.
2 Corinthians 2:4
For I wrote to you out of much affliction and anguish of heart and with many tears, not to cause you pain but to let you know the abundant love that I have for you.
Paul could have used a word that would have described a believer's interference in the work of the Spirit in spiritual terms. To resist or to quench conveys the meaning and preserves the spiritual sense of the working of the Holy Spirit either in the individual, or in the Church.
Instead, he chose a word that always describes a personal feeling or reaction. In doing so, Paul intentionally personified the Holy Spirit.