They got as far as building their own moon rocket, the N1. It was comparable in size to a Saturn V, and with an even more powerful first stage. They built six, and launched four. All four exploded or crashed during the launch, by which point it was clear that the race was lost to the Americans and the N1 wasn't practical, so it was canceled.
The legacy from the Soviet manned moon program lives on. The Soyuz spacecraft still used by the Russians was originally designed to be their lunar spacecraft. Engines originally built for the N1 were stored for decades, then purchased by Orbital Sciences for use on their Antares rocket. Unfortunately, the fifth Antares launch crashed due to an engine failure and Antares is now being redesigned to use a different engine.