Detective Inspector Richard Cornell, from the East Midlands Special Operations Unit, said: "Toni Cole knew what she was doing was totally inappropriate, and that her behaviour was not only putting her at risk, but also the safety of her colleagues and inmates.
Police said Cole spent "considerable time" with the prisoner, whom she admitted she had kissed on at least one occasion, at the prison in Wellingborough.
"The majority of prison staff carry out their duties to the highest standards, and I hope this sentence sends a clear message to those who seek to undermine public trust while holding positions of authority that inappropriate relationships will be robustly dealt with using the full force of the law.
The texts and calls, which took place over five months, were "sexualised or flirtatious" in nature and included a photograph of underwear, Northamptonshire Police said.
Police said the relationship came to light during a meeting on 25 January 2023, which had been arranged to discuss an unauthorised overtime shift she had worked two days earlier.