Zond 4, a formal component of the Soviet Zond program and unmanned version of Soyuz 7K-L1 manned Moon-flyby spacecraft, was one of the first Soviet experiments towards manned circumlunar spaceflight. It was launched to test the spaceworthiness of the new capsule and to gather data about flights in circumterrestrial space. It was launched away from the Moon either to avoid trajectory complications from its gravitational pull, or, according to NASA, probably unintentionally.
The spacecraft was successfully launched into a 330,000 km apogee orbit 180 degrees away from the Moon, however on re-entry the L1's guidance system failed. It hit the atmosphere precisely at the calculated time, but was not guided to generate lift and fly out of the atmosphere again. A ballistic re-entry would mean no recovery on Soviet soil, so the APO destruct system automatically blew up the capsule at 10 to 15 km altitude, 180-200 km off the African coast at Guinea.
Read more about Zond 4: External References