Gravity on the Moon is about six times less than on Earth. However, it is still quite substantial to reckon with. For a bullet or any other object to overcome the attraction of the moon, it must move at a speed of 2.38 km/s (1.47 miles/sec) or faster. This is precisely the second cosmic velocity of the moon.
It is enough to simply compare the speed of bullets fired from different types of weapons with 2.38 km/s. So, for example, the initial speed of a bullet leaving the AK74 barrel is 910 m/s or 0.91 km/s. Obviously, this speed is not enough for a bullet to overcome the gravity of the moon. Therefore, a bullet from AK will inevitably fall back to the moon.
The highest muzzle velocity for a Winchester .220 Swift bullet. This bullet leaves the trunk at a speed of 1.2 km/s. Alas, even this speed is not enough to send a bullet from the Moon to Earth.
At the moment, there is only one gun that fires a projectile at a speed sufficient to fly from the Moon to the Earth. Shells from a railgun are accelerated not by expanding the products of the combustion of gunpowder, but by means of a magnetic field.
To date, the railgun is still a weapon of the future: there are only a few prototypes of it. The railgun shell leaves the barrel at a speed of 4 to 6 km/s, which is more than enough to overcome the gravity of the moon.
However, for a projectile from a railgun to reach the Earth, extremely accurate aiming is necessary; when fired “by eye,” the projectile most likely will miss the Earth and begin to rotate around it in an elongated elliptical orbit.
With successful aiming, the projectile will fly to the Earth, enter the atmosphere at a speed of about 11 km/s and melt in its dense layers without reaching the surface.