In the photos, the warder from Losperfontein Correctional Service Centre in Brits, North West, is in uniform kissing and hugging a male prisoner.
It was unclear where the photos were taken, reported eNCA.
The incident caused the warden to take her own life on Monday and a suicide case was opened.
Correctional Services spokesperson Singabakho Nxumalo said it is unclear how the pictures were shared and who shared them.
An investigation is underway to indicate the violations and to recommend sanctions.
“The Department of Correctional Services [DCS] has been made aware of images involving an official and inmate from Losperfontein Correctional Centre in an intimate position circulating on social media,” Nxumalo told eNCA.
“As this is disturbing and strictly prohibited, the DCS condemns this type of behaviour in the strongest possible terms.
“Whilst DCS was busy investigating this matter, we have since learned with shock that the official allegedly appearing on the images has committed suicide.”
Regional Commissioner Mandla Mkabela said: “On behalf of DCS, we want to convey our condolences to the family and colleagues of the deceased official.
“We have dispatched a team of senior managers and our Employee Assistance Programme specialists to provide necessary support.”