The suspect, 44-year-old Aminadab Gaxiola Gonzalez from the nearby city of Fullerton, has been charged with four felony counts of murder, one felony count of attempted murder, and two felony counts of attempted murder of a police officer, Xinhua news agency quoted the Orange County District Attorney's office as saying in a statement on Friday.
A nine-year-old boy, two adult women and one adult man were killed on Wednesday evening during the bloodshed in the city of Orange in Orange County.
Another woman was wounded and taken to a hospital where she remains in critical but stable condition.
Orange County District Attorney Todd Spitzer told reporters that the boy died in the arms of his wounded mother who was trying to save him in the shooting.
Prosecutors were quoted in the statement as saying that Gonzalez is eligible for the death penalty.
The suspect remains hospitalised in critical but stable condition.
The identities of the four victims were released by the Orange Police Department on Friday.
The nine-year-old is confirmed as Matthew Farias and the other three are 28-year-old Jenevieve Raygoza, 50-year-old Luis Tovar and 58-year-old Leticia Solis Guzman.
Officials said the suspect and all the adult victims had both personal and business connections to each other.
This was the latest mass shooting in the last two weeks.
On March 22, 10 people, including one police officer, were killed in a mass shooting at a supermarket in Boulder, Colorado.
On March 16, a series of mass shootings occurred at three spas or massage parlours in the metropolitan area of Atlanta, Georgia, which killed eight people including six Asian women.