El Salvador should "end the shameful and discriminatory practice of criminalizing women once and for all by immediately revoking the nation's draconian anti-abortion laws," Amnesty's Americas director Erika Guevara-Rosas said.
Hernandez gave birth in April 2016 in the bathroom of her home in the central Cuscatlan region. She was 18 years old and eight months pregnant.
She said her son was stillborn but a court in the city of Cojutepeque convicted her of murder after prosecutors said she was culpable for not having sought prenatal care.
Hernandez said she had not known she was pregnant and gave birth on the toilet after feeling abdominal pains.
Hernandez became pregnant as a result of a rape that she did not report out of fear because her family had been threatened.
Deleon told reporters that Judge Jose Jurado Martinez said in his ruling "that there was no way to prove a crime and that's why he acquitted. He said it had been a complicated delivery."
Earlier, Deleon tweeted that although she was "bursting with happiness," the fight would go on "because there are still women who have been prosecuted and who need justice."
A January report by the Inter-American Commission on Human Rights urged El Salvador to revise the cases of women sent to prison for having abortions.
El Salvador should "carefully review the convictions" of each of the women, the report concluded.
President Nayib Bukele, who took office in June, has pledged to improve the human rights situation in his country.
In March, three women serving 30-year sentences for aggravated homicide after losing their babies by miscarriage were released from prison.
But around 20 women remain locked up in similar cases, serving long sentences.
Many women who suffered miscarriages or complications in pregnancy ended up being found guilty of voluntary abortions, the rights commission said.
El Salvador's law against abortions provided for prison sentences of between two and eight years, but courts often found the women guilty of the more serious crime of aggravated homicide, which carries punishment of up to 50 years behind bars.
An appeals court in El Salvador on Monday acquitted a 21-year-old rape victim accused of killing her stillborn baby, in a landmark case closely watched by rights groups.
The court in San Salvador overturned a 30-year sentence imposed on Evelyn Hernandez, who was convicted under the Central American country's strict anti-abortion laws in 2017.
Hernandez's lawyer, Bertha Maria Deleon, triumphantly announced the verdict on Twitter: "Acquitted! Yes we could."
"Thank God, justice has been done," Hernandez said as she thanked her supporters from the steps of the courthouse in San Salvador's northeastern Ciudad Delgado district.
The 21-year-old, who served 33 months of her original sentence, said "it was hard the whole time I was inside."
"My future is to continue studying and to move forward with my goals. I am happy," she said.
Hernandez's legal team had secured a retrial after appealing the 2017 verdict on the grounds that it had failed to take into account key forensic evidence indicating that the baby had choked in the womb.
The month-long retrial concluded last Friday, with prosecutors requesting a 40-year sentence. They now have 10 days to appeal the verdict.
Amnesty International welcomed the verdict as a "resounding victory for the rights of women in El Salvador."
"It reaffirms that no woman should be wrongly accused of homicide for the simple fact of suffering an obstetric emergency," the rights group said.