There are a few guns that exist that could achieve the necessary velocity (just shy of 4,000 mph) but they’re not handheld. But yes, it would be possible for the right gun to fire a bullet that went around the moon and hit you in the back of the head.
Lunar gravity field is very uneven - that one orbit might be enough for it slighly change where the bullet shows up again.