Philippi, where Paul spent time in a jail cell, was a city in eastern Macedonia established by King Philip II of Macedon. The king started the city in 356 B.C., the same year his son and heir to the throne Alexander III (also known as Alexander the Great) was born. The objective of founding the town was to take control of the neighboring gold mines and to establish a garrison at a strategic passage.
Paul's time in this jail cell occurred during his second missionary journey. In Troas he sees a vision of a man in Macedonia (Greece) asking for help (Acts 16:8-9). He, Silas and others immediately set sail for Neapolis. From Neapolis they travel to Philippi.
While in the city Paul meets a slave. Sensing that she was demon possessed he casts the evil spirit out of the woman. The slave's masters, angered that the profitable fortune telling skills she had are now gone, go on a campaign to get as many as possible to be against the preachers. The evangelists are taken into custody, beaten and thrown in a Philippian jail! They and the other prisoners, however, are soon freed due to a miracle. An earthquake occurs that causes Paul's cell door to open and his bonds to loosen up. This not only happens to him but to ALL those within the prison.
The jailor is woke up by the earthquake, sees the doors of the jail open and assumes all the prisoners have escaped. He then grabs his sword so that he can commit suicide. But why? Sleeping while on watch (e.g. guarding prisoners) was a CRIME in the Roman military. The punishment for such behavior was DEATH! No doubt the jailor wanted to take his own life rather than have the Romans do it. The apostle Paul, however, stops him from killing himself. Then a second miracle, greater than the first, occurs.
25. But about midnight, Paul and Silas were praying and singing praises to God, and the prisoners were listening to them; 26. And suddenly there was a great earthquake, so great that the foundations of the prison were shaken; and immediately all the doors opened, and the bonds of all were loosed. 27. When the jailer awoke from his sleep and saw the doors of the prison open, he drew a sword and was about to kill himself, supposing that the prisoners had escaped, 28. But Paul called out with a loud voice, saying, "Do not harm yourself; for we are all here." 29. And after asking for lights, he rushed in and fell down trembling before Paul and Silas.
30. And when he had brought them out, he said, "Sirs, what must I do, that I may be saved?" 31. Then they said, "Believe in the Lord Jesus Christ, and you shall be saved, you and your household." 32. And they spoke the Word of the Lord to him, and to all those in his house. 33. And he took them in that hour of the night, and washed their wounds; and he and all his household were immediately baptized. (Acts 16:25 - 33, HBFV)
Interestingly, Paul wrote several of his epistles from a prison jail cell. He penned the books of Ephesians, Philippians, Colossians and Philemon during his first Roman imprisonment from 61 to 63 A.D. He also wrote his last known letter, an epistle to his good friend and traveling companion Timothy (2Timothy), while during his final Roman imprisonment in 67 A.D.