New main objective: Look for clues
After getting inside, take a look at the floor. The blood trails that you should note on it will lead to a big chest beside the wall. Open it to find the journal of a certain someone calling himself the Butcher and a pile of flyers warning of this murderer.
Read Butcher's Journal to learn that you're dealing with a crazy necromancer who cuts pieces of his victims' bodies and uses them for some kind of ritual. The next victim is supposed to be a woman named Sussana, who the murderer plans to attack as she heads out of the Candlehearth Hall this night.
Before heading out to help the woman, take a look around the house. The upper floor doesn't contain anything interesting so you can skip it. The shelves and on the ground floor are by far more interesting. On the shelf filled with flyers you should find a strange amulet worth 1000 gold and as you open the wardrobe and head through the false back panel, you should reach a room where the madman performs his mad ceremonies. From the second part of his journal, which can be found on the altar surrounded by bones, you will learn the "ingredients" of the beast that the necromancer wants to bring to life. Apparently you are dealing with a very powerful mage.
New main objective: Follow up on the clues from Hjerim
After visiting Hjerim, speak with one of the city guards. Each one of them will tell you that regarding the Butcher, you should speak to Viola Giordano - she's behind the flyers that you found in the murderer's house. If you ask someone about the amulet, you will learn that such items are the specialty of Calixto from the House of Curiosities - he's sure to offer you a good price for it.
Find Viola and speak to her. The woman usually walks around the whole of Windhelm, though at night you can find her in her house in the western part of the city. Show her the journal found in Hjerim and she will tell you that it probably belong to the Jarl's mage, a certain Wuunferth the Unliving.
Before heading to Jorleif to give him a report, pay a visit to Calixto at the House of Curiosities (south-east part of town). The man will tell you that the amulet does indeed belong to the Jarl's mage. He will also offer to buy it from you for 500 gold. It's worth to accept his offer - you will learn why later on.
New main objective: Talk to Jorleif
As you head into the Palace of the Kings, you will need to make a decision. If you tell Jorleif that you have evidence confirming that his mage, Wuunferth, is the Butcher, he will be thrown into jail. However if you return to town after three (or more) days, it will turn out that the series of murders didn't stop, regardless of your suspect being in the dungeons. If that's how you solved this case, you will need to head to the palace dungeons and speak with the unfairly accused.
You can also lead the investigation in a whole different way. If after returning to the Palace of the Kings you won't speak to Jorleif and instead head to Wuunferth (he's in his office on the first floor), you will be able to interrogate him. He will tell you that he's not connected with necromancy in any way and will conclude that the murderer will strike during the next night, in the Stone Quarter. Before heading out of the mage's quarters, steal the Stone of Berenziah from the table - it will come in handy during the Thieves Guild quest No Stone Unturned.
If you spoke with the mage rather than with Jorleif, you will save the first one some tortures and in fact save his life. This option is by far the better one.
New main objective: Patrol the streets of the Stone Quarter at night
After solving the case of the court mage, be will give you a mission of protecting the city from the Butcher (regardless of whether you threw him to the dungeon or not). Head to the south-west part of the city, to the market place. On your way there you will hear a cry for help. Head there and you will see Calixto murdering a woman. It turns out he's the Butcher responsible for the murders in Windhelm. He's also the one your sold the amulet to (it was his either way).
If you're fast enough, you can save the woman from being killed. Kill Calixto as fast as possible!
New main objective: Catch the murderer
As you witness the crime, you will have to choice but the arrest the madman. It's best to just attack him a couple times - Calixto isn't a good warrior, so he'll die very fast. If he manages to run away, you will be able to find him at Hjerim and kill him there.
Having dealt with the Butcher, don't forget to search his body to find the enhanced Necromancer Amulet, now worth even more than before. You will also find keys to Calixto's house and chest (there are some useful items to be found there).
New main objective: Talk to Jorleif
Having defeated the psycho tormenting the citizens of Windhelm, you can return to Jorleif and collect your prize. Unfortunately you can't hope for any gold, as there's not much in the castle treasury. You will however be praised and receive the possibility to buy Hjerim - the same in which he crimes were committed. You don't have to worry however, as the room in which the dark ceremonies were conjured will be cleared, so there won't be any bad smells.
Thanks to solving the case, the guards of Windhelm will be more favourable towards you. It can be very useful, especially if you have a tendency to fall into trouble.