You're thinking of the legend that Dom told Pelorat and Trevize near the end of Foundation's Edge:
Dom said, "It's a matter of following the logic to the bitter end. Eventually the robots grew advanced enough to become just sufficiently human to appreciate why human beings should resent being deprived of everything human in the name of their own good. In the long run, the robots were forced to decide that humanity might be better off caring for themselves, however carelessly and ineffectively."
"Therefore, it is said, it was the robots who established Eternity somehow and became the Eternals. They located a reality in which they felt that human beings could be as secure as possible - alone in the Galaxy. Then, having done what they could to guard us and in order to fulfil the First Law in the truest sense, the robots of their own accord ceased to function and ever since we have been human beings - advancing, however we can, alone."
There is no evidence in any of the later works, so far as I'm aware, to suggest that this is anything other than a legend. (It does not fit very closely with the plot of The End of Eternity either.)
A couple of related notes:
Robots and Empire established that the reason that Earth was the only planet with advanced life was the presence of the Moon, which is exceptionally large relative to the Earth, and which resulted in radioactive elements being present in Earth's crust in much higher concentrations than on other planets. In Foundation and Earth, Trevize says that a satellite the size of the Moon around a habitable planet is unheard of. (Saturn's rings are also stated to be unique; it is not explained why our solar system has two such anomalies.)
Foundation and Earth also established that there were still robots in the galaxy, although they hid their existence from mankind, and that they were responsible for both the creation of Gaia and the development of Psychohistory and thus the creation of the two Foundations. The later books Prelude to Foundation and Forward the Foundation expanded on the latter premise.