The suspect, an African-American man named Kori Ali Muhammad, is believed to have shot a security guard last week outside a motel in the city. The guard died in hospital.
Fresno police chief Jerry Dyer told reporters that Muhammad shouted "Allahu Akbar" as he was being taken into custody.
Lieutenant Mark Hudson, a police spokesman, told AFP the FBI had been contacted about the killings and it was too early to say whether they were terror-related.
A spokeswoman for the FBI declined comment, referring media inquiries to local police.
Hudson said Muhammad had also indicated as he was being arrested that he hated white people and the government.
Muhammad faces four counts of murder and two counts of attempted murder, authorities said.
Hudson said the weapon used in the killings had not been recovered.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)