Whenever we consider the "meaning" or "message" of a given story we must remember that such concepts are extremely relative, and every work of literature has a potential multiplicity of meanings that we need to be aware of. However, when we think of this masterful example of the Gothic genre, it is clear that the meaning revolves around the concept of the "double" or the "doppelgänger" that is introduced. Consider how, once he has committed the crime, Markheim comes face to face with a curious and fascinating figure, described as follows:
Perhaps there was a film upon his sight, but the outlines of the new comer seemed to change and waver like those of the idols in the wavering candle-light of the shop; and at times he thought he knew him; and at times he thought he bore a likeness to himself; and always, like a lump of living terror, there lay in his bosom the conviction that this thing was not of the earth and not of God.
Note the insubstantial way this "double" figure is described, and the way that Markheim feels at times that it has a resemblance to himself and that he knows him. Markheim goes on to identify this figure as the devil, and, to support his conclusion, this strange personage does seem to tempt Markheim on into ever-greater depths of sin and persuade him to live his life committing evil acts, however, this does not explain the rather curious change in the expression of this guest at the end of the tale when Markheim determines to be master of his own destiny and turn himself in. Consider how he transforms:
The features of the visitor began to undergo a wonderful and lovely change: they brightened and softened with a tender triumph, and, even as they brightened, faded and dissolved.
Such a change, linked with Markheim's determination to "cease from action" and thus escape his fate of condemning himself to evil, indicates that this figure is actually a projection of Markheim's repressed conscience, a creation of his own mind, that explores psychologically Markheim's character and is able to "tempt" Markheim back to good.
Thus this story is a powerful psychological examination of the conscience of a criminal and how Markheim comes to choose to turn himself in, thus laying down his evil life and stopping his slide into even more hellish acts.