The .22 caliber gun parts were wrapped in plastic and had been jammed into the middle of two plastic jars of peanut butter.
The gun's magazine was loaded with bullets, officials said.
Officers made the find when a checked bag set off an alarm.
A man from Rhode Island was arrested.
Travelers can fly with a gun if they have a proper permit and the gun is properly packed.
MORE NEWS | MTA worker attacked, suspect pulled from under subway car in Chelsea
Suspect in MTA worker attack pulled from under subway car
----------
* More Queens news
* Send us a news tip
* Download the abc7NY app for breaking news alerts
* Follow us on YouTube