This article discusses the purposes of executing the penalty of imprisonment pursuant to the Executive Penal Code of 1997. The Polish legislator considers special prevention to be the basic purpose of executing the penalty of imprisonment. Moreover, the Polish legislator has stated that the purpose is also to protect society against criminal acts. The purposes of executing the penalty of imprisonment, specified in Article 67, para. 1 of the Executive Penal Code, are supposed to be achieved using the means of influencing convicts, which include work, teaching, cultural and sports activities, contacts with family members and the outside world, therapeutic measures and disciplinary penalties and awards. This article presents the significance of the penalty of imprisonment in the programmed rehabilitation system with regard to the achievement of the purposes of executing the penalty of imprisonment. A section of the article discusses the tasks of the Prison Service in this regard.