The police were called after the unknown man was found in West Ewell Primary School around 2pm on February 27.
He had climbed over the perimeter fence without wearing any socks or shoes.
The man stayed for around three minutes before leaving when approached by staff.
Surrey Police have said he made no attempt to harm anyone but was later spotted again in a nearby alleyway – at which point the school began a lockdown.
Officers searched for the man on foot and using a drone but have found no sign of him.
Borough Commander for Epsom and Ewell, Tommy Pearson, said: “Whilst there was no violence or any threat of violence by the man, incidents such as these are understandably very concerning for parents and carers and are taken extremely seriously.
“Staff at the school responded quickly, in line with their prepared safeguarding practices, and instigated a lockdown.
“Whilst we believe this to be an isolated occurrence, we remain in contact with the school and the Safer Neighbourhood Teams have been conducting additional patrols in the surrounding area.
“Enquires to identify the man remain on-going.”
The school issued updates to parents and carers to inform them of a delay in releasing children at the end of the school day due to the lockdown.