Investigators said the two live in the same neighborhood.
"This child was brutally murdered by a 16-year-old with a baseball bat," Polk County Sheriff Grady Judd said in an emailed statement. "There is no reasonable excuse for this. Zero. None. It should never have happened."
Murray was booked into the Juvenile Assessment Center on charges of first-degree murder, possession of marijuana less than 20 grams and possession of drug paraphernalia.
Investigators said Murray was previously charged with two counts of battery against Diaz in March 2016, and one count of domestic battery against his father, Paul Murray, in March 2017.
The death remains under investigation.