Deputy Johnathan Miller was released from jail Thursday after posting $25,000 bail.
The Sheriff's Department said in a news release that the staff at Glen Helen Rehabilitation Center information that the 27-year-old Miller was having inappropriate but consensual contact with the 25-year-old inmate, whose name has not been released.
An internal investigation was launched Tuesday, and Miller was arrested Wednesday.
The sheriff's statement says Miller violated a law forbidding jail and prison employees from engaging in consensual sex with inmates.
It is not clear if Miller has hired an attorney, and a phone number listed under his name was disconnected.