It depends on whether you actually did beat up your girlfriend, and if so, the circumstances surrounding that incident. Pursuant to California Penal Code section 12022.9(a), a 5-year sentencing enhancement is imposed on a defendant who knows or reasonably should know that a woman is pregnant, and yet commits a felony during which he or she personally inflicts injury upon that pregnant woman that results in the termination of her pregnancy. However, this is a sentencing enhancement, and only attaches if the District Attorney is already going to charge you with a felony, such as felony battery.

One way you can get charged with murder is if the District Attorney finds that you intentionally killed the unborn child and decided to charge you with murder of a fetus. Both of these situations, however, require a much more developed factual scenario in order to properly assess your situation. An attorney would need to know whether you and your girlfriend did get into a fight, the circumstances surrounding that fight, and what medical diagnosis (if any) there was when the she lost the baby. Perhaps the reasons why she lost the baby are more attributable to her prior complications and have nothing to do with you. These are questions that an attorney would need answers to. If you are truly worried, I would suggest you consult with an attorney right away.