This is Sherlock Holmes by way of Jack Vance. The novel contains ~8 short stories, each of which involves the clever Magnus being roped into solving one mystery or another on a different world. Magnus will investigate and solve the case, avenge himself on anyone who insulted his dignity, and retire with his profits. Which he then loses to start the next adventure.
It probably doesn't need to be said at this point, but Vance is always delightfully inventive and is just fine as a sci-fi author creating new cultures, species, and worlds. The numbers and science and precise world building are never really the point, it is more he lays out one interesting landscape or setup or set of cultural mores after another. And he keeps the usual Vancian attitudes of low key amorality and deception. I particularly liked the Sardines story, the murder on the space station with its multiple alien interviews, and the syzgy story (which prefigures at least some of the scenes from the Three Body Problem).