The TSA said the incident occurred midmorning at the international departures terminal and involved a man traveling to Korea. The identity of the traveler was not released.
It was not clear what airline was involved in the matter.
The TSA said there was no apparent connection between the incident and the telephone bomb threat that resulted in three planes being searched and cleared at the airport.
Officials said the TSA discovered the stun-gun pen and immediately contacted Port Authority police, who confiscated the weapon and arrested the man on a state weapons charge.
A TSA spokeswoman, Lisa Farbstein, said airport operations were not impacted.
Officials said some weapons are permitted in checked baggage, but stressed that passengers should confirm details about specific procedures for doing so with their air carriers. Stun guns are illegal in New York and are not permitted in carry-on baggage, the TSA said Tuesday.
Farbstein said passengers are responsible for the contents of all bags they bring to a security checkpoint and are responsible to make sure they do not contain illegal or prohibited items.
Passengers can review a list of prohibited items at the TSA website or by using an app called MyTSA to check a list called "Can I Bring?"
That app is available for download at tsa.gov/mobile, Farbstein said.