The man admitted threatening to fire shots at St. Eskils high school but said it was intended as a joke.
All pupils at the school were evacuated at lunch time on Wednesday following threats of a shooting.
Police took the threats seriously and sent a number of units to the school.
"Threats have been made on a website where somebody said they would travel there by train, go to the school and that shots will then be fired," police spokesman Hans-Erik Åkerlund told Aftonbladet.
Police said in a statement that all 1,250 pupils and 50 teachers were to be evacuated from the school. The pupils were informed of the situation at midday and sent home.
The anonymous person or people behind the threats had said the attack would be carried out at 10am.
Management at the school was informed of the threats against an individual pupil at 10am. The school principal's name was also mentioned on the website in question, said Eskilstuna's local council in a statement.
The principal and the police are set to make a decision later in the day as to whether the pupils can return to school on Thursday.