Mr Justice McKinnon directed the jury to return a not guilty verdict after evidence from the prosecution and defence had been heard at the trial of the girl at Winchester Crown Court, Hampshire.
The girl, who cannot be named for legal reasons, had denied the murder of Stephen Jarvis at his home in Southampton.
The judge was expected to start his summing up yesterday, but instead told the jury to return a not guilty verdict. He said: 'You could not reasonably be sure in this case that this tragic death was other than a complete accident.'
As the jury formally cleared the girl of murder and manslaughter she ran crying from the dock into the arms of her 23-year-old sister.
Stephen Jarvis was found hanging by his jumper last November after the baby-sitter left him to go to a church hall disco. His mother, Natalie Weller, 21, had gone to work leaving him playing with the girl, who had looked after him several times before.
The baby-sitter admitted leaving Stephen on his own at his home in Thornhill, Southampton, but told the jury he was asleep in his cot.
At an inquest in March a verdict of accidental death was recorded. A post-mortem examination showed Stephen died of asphyxia due to hanging. But days later the girl's best friend went to police claiming she saw her murder him.
During the two-day trial, the 15-year-old friend said she saw the baby-sitter violently shaking Stephen until his body went limp.
The friend claimed she then saw her tie the sleeves of his jumper to the cot and hang him over the side before they went out. But the baby- sitter denied harming Stephen.
She said from the witness box: 'I knew that going to the disco and leaving Stephen was wrong. I felt guilty and confused. I had let everyone down. Everyone had expected more from me.'
Nicholas Atkinson QC, for the prosecution, said the girl was hyperactive after taking three Tamazapan tranquillisers with half a bottle of peach wine.
Although she admitted taking two of the tablets she said it had not affected her judgement.
The judge told the jury there was no evidence to show how Stephen's sleeves might have been tied to the cot.
'I cannot allow you to speculate if the sleeves were tied in some other way,' he added.
Charles Ackroyd, the girl's solicitor, said she was 'relieved and overjoyed' at the outcome of the trial. Once the allegation had been made it required a full court hearing for her to be vindicated, he added.
Although the process had been a 'dreadful trauma' for the girl, she had listened to advice and her strong character had helped carry her through the trial, which had lasted almost twice as long as she had expected.