This means he would set free those who have unjustly been put into prison. This could also refer to setting people free from the bondage of sin.