Anaheim police said the suspect, Amer Alhasan, was taken into custody Wednesday afternoon at LAX as he was trying to flee on a flight to Jordan, where he has family. Alhasan is a U.S. citizen.
The victim was identified as 38-year-old Tiyanie Ly, a mother of three.
Anaheim police said Ly and Alhasan were in a dating relationship.
During a news conference, Anaheim police said officers stopped Alhasan at LAX with the help of U.S. Customs and Border Protection and Homeland Security.
"If we were about two to three hours later, he'd be out of the country," Sgt. Daron Wyatt said.
Ly's body was found early Tuesday morning behind an apartment complex on the 2100 block of S. Euclid Street.
A person rummaging through a dumpster looking for recyclables discovered the body and called police shortly after 2 a.m.
Ly's family called police after they had not heard from her.
The body was found in a duffel bag, police said. It is still not confirmed where the crime occurred or the nature of the murder.
Alhasan, a 28-year-old resident of La Habra, was on his way to Germany before he was to arrive in Jordan.
Police also said the suspect is believed to have been accused of sexual assault in Jordan.
Bail was set at $5 million.
The district attorney's office is expected to file a criminal complaint Friday.
Anyone who may have dated Alhasan or was aware of his relationship with Ly is urged to contact police.