The teenager allegedly attacked the teacher after an argument erupted during a meeting at Holy Rood High School just before lunchtime on Thursday afternoon.
Police had to forcibly restrain the pupil after staff raised the alarm with a school-based officer when he became enraged and allegedly hurled an object at the teacher. Officers then searched the boy.
It is understood fellow officers raced to the scene after the school support officer called for backup, with dozens of other students contacting concerned parents to relay the news.
The teacher sustained a minor injury after been struck by a book during the argument, but did not require medical treatment, according to reports.
Parents received a text message assuring them “all pupils are safe and attending classes as normal” after rumours of the attack circulated on social media.
A spokesman for City of Edinburgh council said education department staff were working with officers to assist in their investigation of the incident.
He added: “The school is co-operating fully with Police Scotland following an incident at the school on Thursday afternoon.”
A spokeswoman for Police Scotland said: “A 15-year-old male was arrested at a school in the Holyrood area around 12.35pm on Thursday, January 31 in connection with a disturbance, during which a male teacher sustained minor injury.”
She added: “An offensive weapon was discovered during a subsequent search, and inquiries are ongoing.”
Last month, Scotland’s biggest teaching union, the EIS, revealed that violent attacks by pupils had contributed to nearly a quarter of a million pounds being paid out in compensation settlements over the previous year.
Instances cited by the EIS, Scotland’s largest teaching union, include a £12,000 violence claim awarded to a teacher who was assaulted twice by pupils.
The union claimed that as a consequence of the injuries and trauma, and lack of support provided, the teacher suffered severe anxiety and stress, preventing a return to the school.
In another incident a teacher was dealing with a pupil with a history of violence who began screaming and shouting before picking up a chair with what looked like the intention of aiming it at other children in the classroom.
The teacher attempted to protect the pupils in his class and intervened by placing himself between the pupil and the other children. The teacher was then hit by the chair on the right arm, resulting in bruising and swelling. The teacher received a compensation payout of £5,309.
The highest compensation award in 2018 was a £50,000 stress claim paid to a teacher who had been signed off work with work related stress and depression.