Adrian Jerry Gonzalez also faces a kidnapping charge in the killing of Madyson "Maddy" Middleton, said Santa Cruz District Attorney Jeffrey Rosell.
The boy could face life in prison if convicted, Rosell said.
"At this point, there is no plea deal on anything," the prosecutor told reporters.
The girl, an acquaintance of the defendant, voluntarily entered the apartment of the boy on Sunday, the day she was last seen, police said.
Asked whether authorities knew of a motive in the case, the prosecutor told reporters: "I can tell you this. People do things for lots of reasons. Sometimes we understand them. Sometimes we don't."
Gonzalez also faces charges of two special circumstances involving sexual offense, kidnapping and lying in wait, Rosell said.
"I've been here 24 years," the prosecutor said. "Off the top of my head, I can't remember any 15-year-old charged with these specific offenses, including sexual assault offenses."
Gonzalez is scheduled to be arraigned on Thursday, authorities said.
The teen's attorney couldn't be immediately reached for comment Wednesday.
The girl trusted the teenage boy, Santa Cruz Police Chief Kevin Vogel said earlier this week.
"They were alone in the apartment," the chief said. "She willingly accompanied him up to the apartment."
"She was 8 years old. She had a reasonable amount of trust in him," Vogel said. "They were acquaintances. I don't know to what degree they were friends."
The boy was arrested immediately after police found the girl's body Monday because the boy "was in the general proximity" of the recycling bin and may have been watching police search it, Vogel said.
Authorities declined to say how she was killed.
Authorities have interviewed the boy, but Vogel declined to reveal what the boy said. The chief also declined to state a motive.
"The body was located within the recycle bin in a way that if you just merely opened the top of the bin, you would have not seen the body," the chief said. "She was not readily visible."
Investigators believe that the girl was killed upstairs in the apartment building and then her body was later dumped in the bin, the police chief said.
"It's my belief that she was killed even before we got the phone call Sunday" at about 6 p.m. when she was reported missing, Vogel said.
Witnesses last saw the 4-foot-tall, 48-pound girl at 5 p.m. Sunday while she was riding a white Razor scooter with her long hair pulled to the side in a braid, police said.