The shooting occurred on Tuesday at 08:00 local time (13:00 GMT) in Indiantown, Florida, and was witnessed by five other children in the home.
According to investigators the girl's teacher heard arguing and was able to mute before the fatal shots were fired.
The suspect, Donald Williams, 27, was arrested after fleeing on a bicycle.
Maribel Rosado Morales, 32, was killed in front of four of her own children and two young cousins, according to the Martin County Sheriff's Office.
The girl, who attends Warfield Elementary School, was taking her first day of online classes after the coronavirus pandemic forced schools in the area to turn to online learning. Florida is one of the worst hit states in the US with over 542,000 infections.
In a press conference, Sheriff William Snyder said Mr Williams had gone to the home to confront his ex-girlfriend about a Facebook video.
The teacher, he said, "heard a commotion, heard profanity, realised it was some sort of domestic altercation".
"The teacher said she mutes her button [so] nobody has to hear it, and then she sees the 10-year-old put her hands up to her ears," he continued, adding that the screen immediately went black after the child's reaction.
He added that a bullet was found to have struck the computer.
Mr Williams fled by bicycle before boarding a city bus. After demanding that the driver take him to a neighbourhood not on her route, the driver called police.
Mr Williams was arrested by a Swat team who happened to be training the area at the time. According to the sheriff, he has already given a "full confession".
He has been charged with murder, as well as several other felony charges including being a convicted felon in possession of a gun. The sheriff said that he will also be charged with armed burglary and armed home invasion, and that there may be additional penalties due to the presence of children during the alleged crime.
The Florida Department of Children and Families will be tasked with finding new homes for the victim's children, who are all between the ages of 10 to 17, investigators say.
"Our deepest sympathies and condolences go out to the victim's family, including the children present in the home who were witnesses to this heart-breaking and senseless tragedy," the Warfield Elementary School and the Martin County School District said a statement.
"We have our grief team deployed to assist students and staff who will undoubtedly feel the impact of this horrible incident. We stand ready to assist and offer support in any way we can."