In NYC it's very difficult to get a permit for a handgun, and there are also rules around carrying it concealed, loaded, etc...
Laws he broke
Having a gun without a permit
Concealing a (loaded) gun without a permit
I believe some of the charges related to the shooting itself were dropped, but he was eventually convicted / imprisoned on illegally owning the gun.