Castillo, a 33-year-old parolee, is currently being transported to San Jose, police spokesman Jose Garcia said.
Castillo began his alleged crime spree around 10 a.m. Saturday, when a suspect shot a 42-year-old man during a robbery at a Chevron gas station on Lincoln Avenue.
The victim was taken to Santa Clara Valley Medical Center and is expected to survive.
The suspect fled the scene in a Nissan 300Z that had been reported stolen 9 days earlier. The car was later found at The Plant shopping center at Monterey Road and Curtner Avenue, about a mile from the gas station.
Cindy Nguyen, a 60-year-old Campbell resident, was carjacked at the shopping center at around noon.
Her body was found at 8 a.m. Saturday in a home on the 500 block of North 12th Street. Castillo has ties to the home where she was found, according to police.
Police thought they had Castillo in their sights Friday evening, when a man matching his description was spotted in the area near Mabury and North King roads. Officers fired shots at him after he did something they considered threatening, but he fled into an apartment complex in the area and could not be located despite an extensive search.
Nguyen's car, a white 1997 Lexus, was found in the area after the shooting.