Answer: He had been pro-Puritan in his publications and position.
Milton's imprisonment was mostly due to his political convictions. When the political changes of the Restoration began, Milton refused to change his views. Therefore, he was later on forced to go into hiding for his life. Moreover, his writings were burnt. He was arrested and briefly imprisoned before being liberated due to the influence and intervention of some of his friends.