Moms and dads have legal rights to raise their children. Moms and dads also have the responsibility to support their children financially. The rights and responsibilities go together, so if a court grants parental rights to a man who claims to be the baby's father, it will also order child support.
Husbands and wives don't have legal rights regarding children, unless they are also moms and dads (but adoptive parents count also). The trick here is that a child born to a married woman is presumed to have her husband as the father. Generally the presumption should be overcome by, e.g., listing boyfriend's name as father on the birth certificate, or having boyfriend legally acknowledge paternity. There is some case law in NC, however, that suggests that the only way to only way to overcome the marriage presumption is to perform a blood test that shows boyfriend is the child's biological father.
On the other hand, most men do not want to pay 18 years of support for a child that is not theirs. Blood tests and such are only necessary if your husband claims he is the child's father. And if he admits the child is not his, he has no legal rights - marriage or no.
Your boyfriend should file an action to legitimate the child after he or she is born. You may also be able to do this. Without a legitimation action, the child will not have the same rights as a child born to a married couple (e.g., can't sue for wrongful death of his or her father; can't inherit except by will from father).
Information posted for educational purposes only. Contact an attorney in your area. We recommend you use the NC Bar Association's Referral Service. If you can't afford an attorney, consider our Virtual Law Office at www.RiceFamilyLaw.com to draft the legal documents you need. No attorney client relationship is formed as a result of using this website.