The school's principal called police around 8:30 a.m. Friday. Officers responded, and the standoff ended when the teacher surrendered at about 11:30 a.m.
The police department bomb squad was on the scene, but officials say there is no indication that an explosive device is at the school.
Hundreds of students in the Bronx building were sent to other schools for the rest of the day.
The building houses three schools. The teacher had barricaded himself inside the New Millennium Business Academy Middle School.
There are no injuries. The teacher's identity hasn't been released.
Slideshow archive | ABC13 wireless | Help solve crimes