Paul was arrested and detained at Philippi because he cast out the spirit of soothsaying from a slave girl. This girl was possessed by a spirit that enabled her to predict the future, and her owners were making a profit off of her abilities. When Paul cast out the spirit, he disrupted their business and they became angry with him. They accused him of causing trouble and inciting unrest, and as a result he was beaten and thrown into prison. Despite this, Paul never stopped proclaiming Jesus as Lord and Saviour, and he continued to spread the message of the gospel to those around him, including his fellow prisoners and the jailer who guarded him.