John Andrew Welden faces up to 15 years in prison and three years of supervised release when he is sentenced Dec. 5 on charges of tampering with a consumer product and conspiracy to commit mail fraud.
Welden is free on supervised release until the sentencing hearing.
Welden's ex-girlfriend, Remee Jo Lee, was in court Monday to watch the proceedings. She cried softly as Welden told the judge that he would plead guilty.
"This has been an extremely difficult time for the Lee family," said Lee's attorney, Gil Sanchez.
Welden's attorney, Todd Foster, said that he was certain his client is remorseful and that Welden's family has been profoundly affected.
"It's tragic all around, from every angle," Foster said.
Welden did not speak to reporters when he walked out of the courthouse and into a black Hummer, flanked by two private security officers. His family was ordered to pay for round-the-clock security as part of his bail conditions.
Lee and her attorney - along with federal prosecutors - said Welden forged a signature in March of 2013 on a prescription for Cytotec and relabeled a pill bottle as "amoxicillin." Cytotec is used to induce labor.
Welden admitted in the plea agreement that he forged the signature of his father, who is a Tampa-area obstetrician. Welden's father has not been accused of wrongdoing and has not been charged with any crime.
The younger Welden told Lee that his father said she had an infection and told her to take the mislabeled medication.
Lee, who was about six or seven weeks pregnant, experienced severe cramps and pain and went to the hospital. She miscarried shortly thereafter.
The plea agreement recommends that Welden serve 13 years and 8 months, preferably at a low-security federal prison camp, as punishment.
U.S. District Judge Richard A. Lazzara ordered a presentence report from the federal probation department and said he would take that into consideration, along with other testimony during the December sentencing hearing.
"Whatever sentence I impose on you, you have to live with," Lazzara said.
Welden could have faced a mandatory life sentence without parole if he had been convicted of murder under the "Unborn Victims of Violence Act," a charge that was brought when he was first arrested in May. Prosecutors dropped that charge and added the mail fraud charge as part of the plea agreement.
Welden claims that a Tampa-area pharmacy worker ordered the pills on his behalf and that the pills came in the mail; the pharmacy worker is an unindicted co-conspirator, the judge said. Prosecutors won't say if the unnamed pharmacy worker will be charged.