This section of Acts seems to be the Holy Spirit’s initial fight. When a boxer goes professional they are measured by their first few fights. In Acts 4-6 The Spirit is a knockout!
From the very beginning of chapter 4 the Spirit humbles even Peter, who is on its side. From the very coming of the Spirit in Acts 2 until now in chapter 4 Peter has been talking. The Spirit seems to have had enough with Peter’s talking so he is sent to jail along with his corner, John. The Spirit humbles Peter first. It wants the readers to see that this match is about the Spirit, not about its workers.
Immediately after this is a series of interactions where we see that anyone opposed to the Holy Spirit’s work will get knocked aside as well. Imprisonment gets knocked out when the rulers and elders of the Sanhedrin have to release Peter and John. They don’t release them because of what the men do though, but because, “they saw the courage of Peter and John and realized that they were unschooled, ordinary men” and were “astonished.” (Acts 4:13) It wasn’t Peter and John that won the fight against prison, it was the Spirit doing work through them.
After Peter and John leave prison they go to pray with the other apostles where the Holy Spirit knocks out the ground. As the apostles are worshipping the very way the Spirit told them, “The place where they were meeting was shaken.” (4:31) Not even the ground is stable against the mighty Spirit.
The apostles continue to do what the Spirit ordains and contain to see blessings as they share their possessions. In the middle of all this sharing another competitor emerges. Two of the apostles decide to keep some of their wealth to themselves rather than sharing EVERYTHING. The Spirit literally knocks these two out for good (5:5 & 10). It will not stand for people taking credit for its achievements.
The apostles are apparently unphased by the Spirits tyranny because the go on to healings and wonders (5:12-16). Yet shortly after another adversary emerges when the apostles are persecuted again. The Sadducees got jealous of the fame that the apostles were receiving because of how miraculous the Spirit was working through them. The Sadducees threw them into jail. Just like the last time, the Spirit released the apostles from jail to prove that no enemy of the Spirit will win.