Jesus said that people will die for living and preaching his name. In Acts chapter 7, Stephen is stoned to death for questioning the Pharisees, saying he' seen the Lord, and preaching in the streets.
James is killed in Acts 12 by a sword. He was struck down for preaching and loving Christ and surrendering his life to God. In John, Jesus says you will be killed for faith.
Before Saul was Paul, he had a strong hatred for all Christians. In Acts 7 Saul stoned Stephen for saying he saw God. In Acts chapter 9 he also started killing Christians for just believing in God.
John is related to Acts because Jesus says in John that followers of Christ will be persecuted and killed for their beliefs. They will also be thrown in jail for loving and trusting Jesus.