The woman's lawyer, David Simhon, welcomed the ruling, saying that it "increases the possibilities to obtain a transfer of post-mortem insemination" for French couples.
Post-mortem medically assisted procreation and the export of sperm are banned in France but the court in Rennes, western France, found "exceptional circumstances" in that the woman lost her baby just before coming to term and shortly after the death of her husband in January 2016.
It ordered the hospital that has stocked the man's gametes - cells that can unite with another of the opposite sex for sexual reproduction - to export them to a "European establishment that accepts to proceed to a post-mortem insemination".
Not to do so would be a "disporportionate infringement of her right to the respect of her decision and that of her late husband to become parents", it ruled.
Toulouse widow fights to conserve sperm
A court in the south-western city of Toulouse was due to hear another case concerning the surrender of a dead man's sperm on Wednesday.
His widow wanted to prevent the sperm, which can be kept for up to 20 years, being destroyed, lawyer Amaury Pigot said before the judgement.
The legal limit for medically assisted procreation in all countries has passed but she hopes to use it if legislation changes anywhere.
The couple had already started the procedure for assisted procreation when the husband was diagnosed with cancer in 2013.
A panel of doctors ruled against assited procreation before his death in 2014.
Previous ruling for Spanish widow
On 31 May France's highest legal authority, the Council of State, agreed to a Spanish woman's request for the transfer of the sperm of her late husband.
But it pointed out that, although post-mortem insemination is legal in Spain, it remains illegal in France.
Pigot commented that the ruling was not helpful for his client.