Nigrelli, 32, an English teacher in Missouri City, Texas, collapsed in a coworker's classroom when she was 36 weeks pregnant.
"Apparently I told her I feel very faint and I put my head down and I essentially just passed out," Nigrelli tells ABC News.
Her heart had stopped.
Also see: Iowa toddler to undergo groundbreaking 'smile surgery'
Coworkers started CPR and used a defibrillator on Nigrelli, keeping her alive until paramedics arrived.
"My wife is pregnant," Nigrelli's husband, Nathan, also a teacher at the school, said in his panicked 911 call. "She's having a seizure! The baby's due in three weeks!"
Doctors delivered baby Elayna by emergency caesarean section. Nigrelli's heart wasn't beating at the time, so the operation was considered a post mortem delivery.
Immediately after Elayna was born, doctors tried to revive Nigrelli again. Remarkably, her heart started beating. She was placed in a medically induced coma for the next five days.
"The doctors told me that Erica delivered post-mortem because she did not have a heartbeat when they took the baby out," Nathan tells the Fort Bend Star.
Also see: 'Miracle twins' born 87 days apart
"But I married a fighter and now I had a baby girl who was a fighter too."
Nigrelli was diagnosed with a previously undetected heart condition known as hypertrophic cardiomyopathy, a condition in which the heart muscles thicken.
"Thankful is...not a strong enough word for what they've done for us," she says of her coworkers who were honoured this week at a city council meeting.
Now three months old, little Elayna is doing well, weighing more than eight pounds. While she still required oxygen and will have to undergo therapy, doctors are confident the baby will make a full recovery, CBS News reports.
"We feel great," Nathan tells CNN. "We have a wonderful baby. My wife is back to 100 per cent."