In the legal order of the Kingdom of Poland, the institution of ecclesiastical penance was introduced by the Code of Major and Corrective Penalties of 1847. This paper seeks to address the question of the rationale behind the introduction of this institution into criminal law and its legal character, analysing the offences to which it was applied. To this end, the institution of ecclesiastical penance is analysed within the structure of the code, its essence elucidated, and the institutions responsible for adjudication and imposition indicated, along with the persons subject to it. Furthermore, offences punishable exclusively by ecclesiastical penance, or by ecclesiastical penance and secular or canonical penalties, are systematised. It is submitted that the legislator, in introducing this institution into the Code of Major and Corrective Penalties, has positioned ecclesiastical penance as a sui generis punishment. In the event of its imposition, the legislation did not offer the possibility of redemption from its personal execution, but no means of its enforcement was indicated either. The findings established will perhaps deepen the existing views on ecclesiastical penance in the Code of Major and Corrective Penalties.