In the early 1960's, I read an SF book that I think was titled "Rogue" or "Rogue Planet", although that could be wrong. The story involved a planet that somehow inserted itself into orbit near earth. Society then was quite decadent, except of course for the hero. The planet was sentient and also 'moral'. The hero eventually had to escape earth and flew to this planet, which he found to be an Eden. The planet had created a barrier to other ships, and eventually this man and a female (possibly created by the planet) were able to start a new life together. It's not 'great literature', but it is a story I'd like to read again.
Many and strange have been the adventures of Moon Base Alpha and its crew since the atomic waste pits on the dark side of the Moon exploded and sent them careering out of Earth orbit, deep into unexplored space.
Always they have managed to overcome their perils and continue their strange Odyssey. Now, at last they seem to have reached the end of the road, as caught in a weird cone of force emanating from a sentient planet, they find themselves ageing at an incredible rate and powerless to break free.
The title is not entirely accurate, as they don't encounter a planet, but rather "a giant green pulsating brain that they call Omphalos" on the planet.
The book you are looking for is Rogue in Space by Fredric Brown. The book about a sentient asteroid that arrives in the solar system's asteroid belt after countless aeons of wandering interstellar space. He collects the asteroids to himself to become a planet. The hero, his girlfriend and some others, escaping from a decadent earth, are allowed to land and start a new civilization.