Anthony Alexander Padgett was taken into custody in Chula Vista, just south of San Diego, Capt. David Nisleit told reporters.
Nisleit said police had probable cause for the arrest but didn't offer specifics. He said the investigation is ongoing and indicated tips from the public led to Padgett's arrest.
Authorities have not determined whether Padgett is their only suspect.
Two homeless men have been killed
-- one set on fire, the other beaten to death -- and two others were hospitalized with serious injuries, one who was beaten and the other set afire.
The first three attacks occurred in 25 hours from early Sunday to Monday. The fourth happened around 5 a.m. Wednesday, when authorities found a man ablaze on the ground across from the federal courthouse downtown.
That victim, a 23-year-old man, was taken to a hospital and is expected to survive, Nisleit said Wednesday. A 61-year-old man who was beaten is also expected to survive, he said.
The motive for the attacks is unknown.
Detectives have surveillance video from a convenience store. Nisleit said Thursday that police believe Padgett is on that video.
"This killer has targeted some of our city's most vulnerable residents while they are asleep," Police Chief Shelley Zimmerman said. "Please, please, please -- public safety is a shared responsibility."
Nisleit said a burning towel was found on the latest victim. Witnesses saw a man crouched over the victim and described what they initially thought were burning clothes.
On Sunday morning, witnesses reported seeing a man on fire running down the train tracks alongside Interstate 5, according to CNN affiliate KSWB
. Police later found the badly charred body of a male.
About the same time, witnesses reported seeing another man in his late 40s to early 50s darting across the freeway away from the train tracks carrying a gas can, said Lt. Manny Del Toro with the San Diego Police.
Two similar attacks took place early Monday morning, when officers found two more victims with severe trauma injuries, one who later died, police say.
"We're absolutely convinced these attacks are linked," Nisleit said. "We're working through all these cases again."
All the attacks appear to be "senseless, random attacks on the homeless," he said. He encouraged the homeless population to sleep and walk in groups and noted that the attacks have been unnerving for the city.
"It is extremely unsettling for the public, it is extremely unsettling for the homeless population and it is extremely unsettling for the San Diego Police Department," Nisleit said.
This isn't the first time San Diego County has seen violence targeting the homeless
and transient populations. Earlier this year, two brothers and a female teenager were accused of fatally beating a homeless man in El Cajon after one of the brothers allegedly got into a fight with some other homeless people in the area.