Police subdued and arrested the suspected attacker at the school in the city of Kragujevac, the ministry said in a statement, Xinhua reported.
One of the injured was believed to have sustained a gunshot wound, while the other was injured by shattered glass, said the statement. Earlier unofficial reports cited by local media said the two injured were a school cleaner and another staff member.
Police and emergency medical teams were dispatched to the scene, and access to the school was cordoned off. The incident remains under investigation.