According to custodyxchange.com, the following states may allow a divorce while pregnant

In these states, a judge may finalize a divorce before the baby is born 

1. New York 

2. Illinois 

3.Pennsylvania 

4.Ohio 

5.Washington 

6.Massachusetts 

After the baby is born, you will likely need to return to court to decide parenting issues