Did the individual who currently owns the gun reside in another state when he acquired it?
The reason I'd ask is that if you live in another state and own firearms, and move to NJ, you do NOT need to do anything (you don't need to register or anything), provided that the firearms can be possessed in NJ (example, no assault rifles).
If your cousin acquired it as a resident of another state, he is still in lawful possession of it if he moved here.
If it was "handed down" without a purchase permit for each transfer (even if it was given and not sold), well your cousin could face a lot of trouble, unless he inherited it through a will. I would highly suggest tracking the gun's timeline of ownership as far as possible, for your cousin's sake.
Ignore Dave P and his "gun show loophole" idea. This will land you in a heap of trouble as well. NJ does not allow residents to purchase handguns out of state without a dealer transfer.
So far as I know, you would be in the clear if you completed the purchase with a purchase permit; you would not need to know where it came from. I don't know about your cousin, though. He would have to sign as the seller, and the duplicate copies get sent to the state police and local police. If they follow up on it, well they might question your cousin as to how he got it.