"The Prowler in the City at the Edge of the World" is a science fiction short story by American writer Harlan Ellison, first published in his 1967 anthology Dangerous Visions.
He is surprised to discover that there are other mental presences or personalities coexisting within his own mind, commenting on the brutality of his acts as if they were spectators at a theatrical performance or aesthetes critiquing a work of art in a museum.
They proceed for their own malign amusement to mentally expose him to his own subconscious lusts, desires, and petty hatreds; prior to their interference he had suppressed his awareness of these urges.
He realizes that he had persuaded himself that his killings were purely moralistic in intent, meant to draw attention to the injustices, inequalities, social wretchedness, and debauchery of industrial Victorian society.
To Jack's despair, his actual base motivations are fully revealed to him by the City's denizens, after which they delight in his ensuing psychological anguish.