Police say the boy was standing on the sidelines of a game at Crossroads Middle School in South Brunswick when he collapsed.
A student and then a nurse performed CPR, then police arrived with a defibrillator.
He was pronounced dead later at Robert Wood Johnson University Hospital in New Brunwswick.
The name of the high school senior has not been released.
Information from: The Star-Ledger, http://www.nj.com/starledger