Leo Latifi had been with family members at an after-school swimming club at Great Baddow High School in Chelmsford when the incident happened.
Essex Police said officers were called on Thursday to reports that a boy fell from a locker and became trapped underneath it at around 6.15pm.
Leo, who was a pupil at St Michael's Primary School in Galleywood, Essex, died in hospital.
St Michaels Church is open all weekend for people to pay their respects.
Maria Rumsey, head teacher at Leo's school said: "All the staff, parents, governors and pupils from St Michael's school are shocked and immensely saddened to hear of the tragic death of our Year 4 pupil, Leo Latifi.
"He will be greatly missed by all.
"We wish to extend our thoughts and condolences to all of Leo's family and friends at this saddest of times.
"Leo was a sparkle in our school. His face lit up the classroom and his mischievous blue eyes made us all smile.
"He had a wide circle of friends in the year group, all of whom will miss him greatly."
Carrie Lynch, head teacher of Great Baddow High School, said the "thoughts and prayers of everyone at Great Baddow High School" are with Leo's family and friends, his school and swimming club.
Leo's school said it is "supporting all of our children and staff today as we try to come to terms with this sad loss".
Stay up to date with the latest news stories from a Christian perspective. Sign up to our daily newsletter and receive more stories like this straight to your inbox every morning.