Authorities were called to Thomas Kelly Elementary School when the alarm went off shortly before 3 a.m.
Sheriff's deputies arrived at the Moraga Avenue campus to find a broken window by the office.
One of the suspects, who was identified only as a teenager, ran out of the school and was caught by police.
Police said the second suspect got away at first, but was later arrested at his home.
Both suspects may face burglary charges, even though nothing was taken.