There are several reasons, firstly the journey to the Moon required a much more powerful rocket and much more sophisticated spacecraft than those used before; but the Russian two chief rocket scientists (Glushko and Korolev, who created the first intercontinental ballistic missiles) split up because of different views on what fuel should be used, how should the rocket engine be designed etc. (Actually, Glushko thought that the engine design by von Braun, used in the Saturn V rocket that eventually carried man to the Moon, is impossible and would never work in practice). Besides that, a terrible accident happened during the 60ies on one of Soviet launch pads, killing many engineers and other experts in the field of rocket design. In addition, Korolev, as the main rocket engineer, died in 1966 which further set back the Soviet program.
Nevertheless, a short time before the successful American mission to the Moon, Soviets had had the N-1 rocket (Soviet equivalent of Saturn V) ready for test launch. The astronauts then volunteered to risk their lives and fly using that rocket in an attempt to reach the Moon (I think they were just planning to fly beside it and get back to Earth, not to actually land on the surface). Luckily, they were refused and the rocket was tested with no crew on board. It exploded shortly after launch.
After that, since Americans succeeded in going to the Moon, Soviets abandoned their plans, since it would cost a huge amount of money, but would serve them no useful purpose.
Nevertheless, a short time before the successful American mission to the Moon, Soviets had had the N-1 rocket (Soviet equivalent of Saturn V) ready for test launch. The astronauts then volunteered to risk their lives and fly using that rocket in an attempt to reach the Moon (I think they were just planning to fly beside it and get back to Earth, not to actually land on the surface). Luckily, they were refused and the rocket was tested with no crew on board. It exploded shortly after launch.
After that, since Americans succeeded in going to the Moon, Soviets abandoned their plans, since it would cost a huge amount of money, but would serve them no useful purpose.