Jeremiah Bell, 22, is accused of assaulting 54-year-old Armando Barron repeatedly with an aluminum bat on Sunday in the 300 block of North Maple Street. Surveillance video shows Bell running from the area shortly after.
"From his confession, he admitted to leaving his house with the intention to kill somebody with a bat," Rialto Police Det. David Patilla said.
Police said they recovered a baseball and glove left at the scene.
Barron, of Rialto, was taken to a hospital with life-threatening injuries.
Bell was arrested the next day at his apartment on suspicion of attempted murder. Police initially believed the attack was random, but now believe he was targeting anyone who was not black.
He was charged with attempted murder with a hate crime enhancement.
Anyone with information is asked to call Rialto Police Department Det. David Padilla at (909) 421-7227.
A GoFundMe fundraiser was set up to pay for Barron's medical expenses. To donate, visit gofundme.com/armandobarron.