The dark city is not a place on earth, but an alien creation, floating in space. The humans have all been apparently abducted by the aliens, who give them false memories, tweaking and changing things as they please, in order to experiment on human behavior. They do this by "tuning", a telekinetic ability to control the physical reality of this world, augmented by a huge machine underground, and through Dr. Schreber (Keifer Sutherland),their human agent, who injects the humans with the new memories. Murdoch (Rufus Sewell) was being given the memories of a serial killer, in an attempt to see how he would react, but he had somehow developed the ability to tune, and stopped Dr. Schreber from injecting him with the false memories. He is eventually caught by the aliens, and is supposed to be injected with a new set of memories (so that he won't remember any of what he discovered), but Dr. Schreber double-crosses the aliens and injects him instead with memories of having used his tuning abilities throughout his life, thereby granting him full mastery of them. Murdoch defeats the aliens, and as the new master of the dark city, causes the sun to rise and creates Shell Beach, the place used in all the fake false happy memories given to the humans in the cities, for real. He is there reunited with Jennifer Connely's character, and though he was too late to save her memories of him, it is implied that they will have a future together.
Thanks, Eytan Z and David H!