On Sunday night, about 15 miles east in San Marcos, deputies answering reports of screams for help and breaking glass found a woman with multiple stab wounds and cuts on her face.
She was listed in critical condition Monday morning, but authorities did not know her condition early Tuesday.
"Malil and the victim had apparently been in a dating relationship which recently ended," the statement said.
Malil was arrested for investigation of attempted murder, mayhem and burglary, the statement said.
A deputy on duty early Tuesday did not know the name of Malil's lawyer and attempts to identify a lawyer and reach him for comment were unsuccessful.
Malil played one of star Steve Carell's co-workers in "The 40-Year-Old-Virgin," and has appeared in dozens of TV shows including "NYPD Blue" and "Scrubs."