Penal labour

work that prisoners are required to perform

Penal labour/servitude is manual labor that someone is required to perform as a punishment for a crime. It almost always is part of a prison sentence and includes chain gangs.