The Quantum Thief (The Jean le Flambeur Series, #1) by Hannu Rajaniemi
Jean le Flambeur gets up in the morning and has to kill himself before his other self can kill him first. Just another day in the Dilemma Prison. Rescued by the mysterious Mieli and her flirtatious spacecraft, Jean is taken to the Oubliette, the Moving City of Mars, where time is a currency, memories are treasures, and a moon-turned-singularity lights the night. Meanwhile, investigator Isidore Beautrelet, called in to investigate the murder of a chocolatier, finds himself on the trail of an arch-criminal, a man named le Flambeur…
Indeed, in his many lives, the entity called Jean le Flambeur has been a thief, a confidence artist, a posthuman mind-burgler, and more. His origins are shrouded in mystery, but his deeds are known throughout the Heterarchy, from breaking into the vast Zeusbrains of the Inner System to stealing rare Earth antiques from the aristocrats of Mars. In his last exploit, he managed the supreme feat of hiding the truth about himself from the one person in the solar system hardest to hide from: himself. Now he has the chance to regain himself in all his power—in exchange for finishing the one heist he never quite managed.
The Quantum Thief is a breathtaking joyride through the solar system several centuries hence, a world of marching cities, ubiquitous public-key encryption, people who communicate via shared memory, and a race of hyper-advanced humans who originated as an MMORPG guild. But for all its wonders, The Quantum Thief is also a story powered by very human motives of betrayal, jealousy, and revenge.