Police were alerted after the 12-year-old, who fell pregnant at the age of 11, failed to return to her foster family.
The girl from Armadale, West Lothian, is reported to have been handcuffed and to have spent the night in a police cell at St Leonard's police station, Edinburgh.
Now social workers have moved her to a new foster home amid concerns for her mental health after the youngster was alleged to have taken an overdose.
The girl's daughter has remained with her previous foster family and she is reported to be allowed to see her only every other day.
It is understood the youngster was found drunk by police on Sunday night while in the home of her mum, who was in hospital suffering from pneumonia.
When she refused police requests to go back to her foster home she was made to spend the night in custody, later to be charged with breach of the peace.
Just over a day later she was reportedly rushed to hospital after her foster parents discovered her in a deep sleep with pills on the floor.
Doctors released her without treatment but insisted she see a psychologist to help her recover from her ordeal.
According to newspaper reports, a relative said the girl was upset after having her possessions confiscated while in police custody.
Amongst them was a ring, with the word "MUM" on it, which her aunt bought her when she gave birth to her daughter.
The girl was reported to have appeared in front of the Children's Panel on Monday but refused to accept the breach of the peace charge.
The newspaper reports said a "place of safety" warrant had been issued, meaning the police will automatically be informed if she does not return home when she should. A spokesman for Lothian and Borders police said: "Officers were contacted on Sunday night to assist the social work department who informed us that a girl of 12 was missing from foster care.
"The police had intended to return her there but she was in fact arrested for breach of the peace."
The girl, who has not been named, became pregnant aged 11 after having sex with a 15-year-old on a drunken night out with friends in Edinburgh last August.
The authorities were called in following reports that the girl smoked up to 20 cigarettes a day and started drinking alcohol at the age of ten.
She was said to have quit school after a string of exclusions for fighting with fellow pupils and she now receives lessons at a local community centre.
The 15-year-old boy admitted to a charge of having underage sex at the High Court in Edinburgh last week, having been previously accused of rape.
Sentencing for the youth was deferred to August 25 for background reports.