The 16-year-old male, who cannot be identified for legal reasons, made no plea during a private appearance at Greenock Sheriff Court on Friday, the Crown Office said.
Alesha was at the start of a three-week break visiting family on Bute in the Firth of Clyde, west of Glasgow, when she was reported missing in the early hours of Monday. Her body was found a few hours later.
A murder probe was launched following the results of a post-mortem examination.
The 16-year-old was arrested two days after the six-year-old was discovered in woodland near her grandparents’ home.
He appeared in front of Sheriff McIntyre in Greenock charged with murder and an offence under section 18 of the Sexual Offences (Scotland) Act 2009, which covers the rape of a young child.
He was remanded in custody ahead of a second court appearance later in July.
He arrived in a security van that reversed in the back door of Greenock Sheriff Court on Friday morning.
On Thursday, Detective Superintendent Stuart Houston said Alesha’s family had shown “incredible bravery through what has been an unimaginable ordeal”, and he thanked local people on Bute for their assistance in the investigation.