Harris County sheriff's deputies were called to a home on Memorial Crossing Drive near Memorial Falls Drive in response to a shooting/home invasion around 3:30 a.m. Monday.
A preliminary investigation revealed that the woman's ex-husband cut off all power to her home, broke into the back window and shot her four times.
The suspected gunman, Aaron B. Wright, was located and arrested later Monday morning and booked into the Harris County Jail, according to Gonzalez. He's charged with aggravated assault.
The woman is in stable condition, according to Sheriff Ed Gonzalez.
According to Harris County Deputy Investigator John Mook, the couple has been divorced for about a year.
Their four children between the ages of 5 and 12 were home, sleeping in their beds during the shooting, according to Mook. They were all uninjured.
Investigators say Wright may have anticipated losing custody of the kids when the two were scheduled to appear in court Monday for a child custody hearing.
Wright reportedly used the power box on the side of the home, which was unlocked at the time of the shooting, to cut off the power.
When asked if Wright had made threats before, Mook said he had a history with the woman's new boyfriend.
"I do understand that he has threatened the new boyfriend multiple times," Mook said. "I'm sure this was a contentious divorce as well. We're looking into all of that."
Surveillance video shows a second suspect with Wright at the scene. Deputies believe the second suspect is Wright's new girlfriend.
It is unclear if she was also arrested when Wright was taken into custody Monday.
The pair reportedly drove to the home in Wright's work truck, parked down the street and approached on foot. They both fled the scene on foot, according to Mook.
As part of the investigation, a K-9 unit searched Wright's home and place of business about 40 minutes from the scene in north Harris County, deputies said.
The four children are safe with their grandmother, according to investigators.
MORE | US gun violence - President Biden announces efforts to stem rise in violent crime