The 15-year-old was saved from killing herself after her family found out she had signed up to the challenge and tipped off the authorities.
The youngster was being cared for at a hospital psychiatric unit in Barcelona on Thursday night.
News of her admission comes just days after it emerged a school in Essex had made parents aware of the game following talks with police.
It will add to concern that the challenge – thought to be behind a string of teenage suicides in Russia – is gaining popularity in Western Europe.
The girl at the centre of the Spanish scare is understood to have been contacted by a mystery Internet user at the start of the month who asked her if she wanted to commit suicide and sent her basic instructions.
Spanish radio station SER said she agreed to do everything she was asked and send photographs as proof, as well as erase online exchanges to ensure she left no traces of messages.
She reportedly began a series of daily challenges soon, which included self-harming herself on her arm with a knife and going to a nearby station to watch high-speed trains rush past.
She is understood to have signed up to killing herself by throwing herself under a train – but became so absorbed in the game she was playing that she confided in a relative who alerted the police and health officials.