It's connected to Pieces of the Past, which unlocks when you're level 20. Once you turn level 20, a courier will inform you of a museum opening up in Dawnstar. There, you'll run into a guy named Silus Vesuius who begins the quest.
During the quest:
He'll task you with getting all three parts of Mehrunes’ Razor. Once you do that, he'll join you when going to the shrine, and will unlock it.
Just as an additional aside (and major spoiler):
At the end of the quest, you'll have a choice between killing Silus or letting him flee. You must kill Silus in order to get the Daedric artifact.
Once after that, two Dremora will appear at the shrine. Kill them and take the keys to get in the shrine. Inside you'll find 2 more Dremoras and there are so much loot.
But hey! Don't go away!
Wait 10 days and the Dremoras will respawn and the shrine will be reset. You can kill the Dremora, and then wait for 10 days to get more, leaving a good method of getting unlimited daedra hearts.