Mississippi’s longtime corrections commissioner resigned Wednesday amid a federal investigation into the state’s prison system, which has been plagued by squalid conditions and violence by guards and inmates.

The commissioner, Christopher Epps, who had led the Mississippi Department of Corrections since 2002, submitted a letter of resignation to Gov. Phil Bryant on Wednesday, Knox Graham, a spokesman for the governor, said.

Mr. Graham said he could not discuss why Mr. Epps had stepped down, but he said the governor had begun a search for an interim commissioner.

Mr. Epps, 53, could not be reached for comment.

The Justice Department is investigating treatment of prisoners and conditions at jails, said a person with knowledge of the investigation who was not authorized to speak publicly. Advocates for prisoners say that stabbings, rapes, beatings and extortion are common in a number of the state’s jails.