Kirsty Howat, 24, began a relationship with 20-year-old Liam Moretto which resulted in her pregnancy while he was an inmate at HMP Brinsford near Wolverhampton.
Howat was working at the prison, which mainly contains young adults, as a catering instructor for Her Majesty’s Prison and Probation Service at the time.
The prison authorities were suspicious of the relationship and gathered evidence from a covert CCTV camera.
Howat, from Newcastle-under-Lyme, initially accepted a relationship but denied sexual intercourse.
However she later admitted the inappropriate relationship, saying she had "panicked", which is why she had previously denied sexual relations.
Howat also admitted that she used the prison systems to obtain highly confidential information about a prisoner who Moretto had a feud with and that she passed that information on to Moretto.
'Shocking is an understatement'
At the hearing at Shrewsbury Crown Court, Howat was sentenced to eight months in prison for misconduct in a public office.
Sentencing Howat, Judge Jonathan Gosling, said: “The governor described your behaviour – having a sexual relationship with a 20-year-old prisoner and conceiving a baby in prison – as shocking. That is an understatement.
"You made a calculated search for information about another prisoner. The gravity of that is on a level with the sexual relationship itself."
Paul Reid, from the Crown Prosecution Service, said: “This is a serious offence. Howat was meant to be helping to rehabilitate and re-integrate prisoners into society but she abused her position and began an intimate relationship with Liam Moretto.
“She also shared confidential information about another prisoner with Moretto.
"The public must be satisfied that those entrusted to carry out the management of custodial sentences do so to the highest standards of probity. By her actions, Howat has done significant harm to public confidence in the prison system."