Staff at Valley Park Primary School in Sheffield helped the man, who walked in on Monday evening after the children had left, and phoned 999.
South Yorkshire Police say he was stabbed on a nearby footpath and 20 year-old-man man has been arrested on suspicion of assault.
The victim’s injuries are not believed to be life threatening and the school reopened today.
In a statement, headteacher Lauren Johnstone said: “After children had gone home, an isolated incident took place at school involving a member of the public who approached school for assistance of the school staff.
“Emergency services were called and attended school.
“We have shared this incident with Ofsted who have decided to cancel tomorrow's inspection in support of the staff who assisted.
“The incident itself had nothing to do with the school, children or staff, but thankfully we were there to help.”
Detective Chief Inspector Ben Wood, from Sheffield District Police, is appealing for witnesses and information.
He said: “I understand that incidents like this can cause concern in the local community, but armed officers were at the location quickly and our enquiries are continuing into what happened.
"Officers remain in the area today as the investigation continues and to provide a reassuring presence.
"The victim was taken to hospital but it is believed they didn't suffer life-threatening injuries.
"If you have any information about what happened please call police on 101 or use the online reporting portal on our website, quoting incident number 606 of 6 December."