He urged doctors and priests to support families to carry such pregnancies to term.
During an audience with participants of a Vatican-sponsored anti-abortion conference, Francis said opposition to abortion is not a religious issue but a human one, asking: "Is it licit to throw away a life to resolve a problem? Is it licit to hire a hitman to resolve a problem?"
Francis denounced decisions to abort based on prenatal testing, saying a human being is "never incompatible with life".
Even those babies destined to die at birth or soon thereafter deserve to receive medical care in the womb, Francis said, adding that their parents need to be supported so they do not feel isolated and afraid.
While one can argue about using medical resources this way, there is value to it for the parents, he said.
"Taking care of these children helps parents to grieve and not only think of it as a loss, but as a step on a path taken together," Francis said.
Francis has spoken out strongly against abortion, although he has also expressed sympathy for women who have had them and made it easier for them to be forgiven.
His comments come as the abortion debate is again making headlines in the US, with state initiatives seeking to restrict the procedure.
Stay up to date with the latest news stories from a Christian perspective. Sign up to our daily newsletter and receive more stories like this straight to your inbox every morning.