It's quite simple, really. The two brothers have a quarrel over the inheritance. Then, one kills the other so as to claim the whole of it for himself, leaving the body here! Quite simple!
And the dead man gets up to lock the door from the inside?
...There's a flaw there... Somewhere...