The alleged attacks on the teenage girls took place last year.
The boy, who has been remanded in custody, has made two court appearances.
The first was a private appearance at Edinburgh Sheriff Court on August 6, with the second held a week later.
A statement issued by Police Scotland to the Daily Record said: “A 12-year-old boy has been charged in connection with serious sexual offences against two girls, aged 13 and 14, in 2017 and 2018.”
Young offenders must be sent to children’s hearings instead of court.
But the case over these alleged attacks would now meet the minimum age for a criminal prosecution in Scotland.
A bill was published this year to raise the minimum age of criminal responsibility in Scotland from eight – the lowest in Europe – to 12.
The Scottish Government said: “The bill was introduced in March and is currently going through Parliament.”
An 11-year-old boy became the youngest person convicted of rape in 2016.
The teenager pleaded guilty to sexually assaulting another boy, who was aged nine, multiple times.
Join our Facebook group Our Edinburgh to share images and news from and around the Capital