Casey Cole is held on $2 million bail, charged with felony murder, robbery and conspiracy to commit robbery.
Authorities say 18-year-old Isaac Rinas drove Cole to Paterson after Rinas received his diploma from Wayne Valley High School on Wednesday.
Police say a man got in the vehicle, brandished a handgun and ordered both men out. Rinas was shot in the neck.
Passaic County chief assistant prosecutor Michael DeMarco tells The Record newspaper Cole is not accused of being the gunman and that suspect remains at large.
Cole's attorney, Joseph Afflito Jr., says his client did not plan a robbery that went awry.
Information from: The Record (Woodland Park, N.J.), http://www.northjersey.com