Police chased after the animal with their flashlights as they attempted to guide it out of the building.
It ran and jumped around inside a classroom at Cedar Grove Elementary School in Toms River.
Police were alerted when someone said they saw the deer break through a window and enter the school.
Officers were eventually able to guide the animal back outside.