The youth, who has not been named, was knocked unconscious with the shock on Friday evening and is being treated in Barcelona’s Sant Pau hospital.
The Mossos d’Esquadra said on Monday that the teenager had climbed onto the roof of the train at Rubí station, a town north of Barcelona at 6.20 pm on Friday when his head came into contact with the cable.
It isn’t the first time the quest for a daredevil selfie has resulted in serious injury.
In March 2014, a 21-year-old man died after touching a high voltage wire when he and his friends clambered on top of a parked train to take photos of themselves.
Last November a Polish student on the Erasmus exchange program has died after falling seven metres while attempting to take a selfie photograph of herself in front of Seville's iconic Triana bridge.
In August a man was gored to death during a bull run while filming the festivities on his mobile phone.