The seaside city of Half Moon Bay was the scene of the assaults.
The victims were all American agricultural labourers of Chinese descent.
Zhao Chunli, the suspect, was detained after arriving at a police station in his car.
In the midst of Lunar New Year celebrations, 11 people died in Monterey Park,
which is around six hours south-east of Half Moon Bay.
Gavin Newsom, the governor of California, described the second incident as "tragedy upon tragedy" in a tweet
while he was meeting with victims of the first mass shooting at a hospital.
Two ranches in the village of Half Moon Bay were the scene of the most recent slaughter in the state.
The first four victims of the shooting were located in a mushroom field,
while the last three were subsequently discovered at a nearby trucking company.
A serious condition is being treated for in a hospital for an eighth victim.