The article examines the initial period of the formation of penitentiary medicine on the example of the prison hospital of the Tobolsk prison castle (ostrog). The article is the first work on the history of penitentiary medicine in the Tobolsk province. The study was based on a wide range of sources, the most significant are documents from central and regional archives, introduced into scientific circulation for the first time. In the first half of the XIX century. The legal framework of penitentiary medicine is being formed, the execution of legislative and subordinate acts can be traced in the activities of the prison administration, its interaction with the West Siberian Governor-General, civil governors, and state institutions. Attention is drawn to the peculiarities of the organization of medical care for prisoners. The development of the hospital’s material base depended not only on the amount of state funds allocated, but to a greater extent on the contributions of the charitable foundation of the provincial prison trust committee, as well as private charity. The management of the hospital was carried out by doctors of the civil medical service, only in 1854, by the decision of the Governing Senate, the position of a doctor was introduced into the prison staff. The causes of morbidity and mortality of prisoners are analyzed, the sacrificial feat of prison doctors during the cholera epidemic of 1848 is noted.