The formula to calculate the escape velocity is given by
ve=2gR...(1)
As both the acceleration and radius of the Moon is much less than that of the Earth, the value of the escape velocity in Moon is much less than that on the Earth.
The average velocity of gas molecules remains higher than the escape velocity due to the lower escape velocity on the moon's surface, making the moon unable to maintain an atmosphere.