Activating the quest
As you enter Markarth for the first time, you will witness a tradeswoman being murdered. The killer will be quickly caught by the guards and you will be approached by a man with a note that you seem to have lost. Check it out from the inventory's level to find an enigmatic invitation to the Shrine of Talos.
There's also an alternative way of starting this quest - if you're fast enough, you can save the woman from the murderer by killing him. She will give you a very precious amulet and you will receive the mysterious note anyway.
New main objective: Go to the Shrine of Talos
You shouldn't have problems with finding the shrine - it's in the very centre of the town, on one of the higher levels. Head inside to meet Eltrys - the one who gave you the note on the marketplace. Speak to him to learn that he's terrified by what's going on in the city. For dozens of years, mysterious and unpredictable murders have been a plague of Markarth. Eltrys' father also died in one of them.
As an outsider, you have more freedom in investigating the case. Your task is to solve the murders case and finding the culprits (Elthrys suspects the Forsworn). You should start off with the latest murder - the murdered woman's name was Margret, and her assassin's - Weylin. Learning more about them should be the first thing you do.
New main objective: Find evidence about Weylin
New main objective: Find evidence about Margret
You can complete these two objectives in any order you like - they're connected strongly. Each time you manage to move the investigation further, you can return to Elthrys and give him a report. This way, you will receive a refund for the costs of investigation - 200 gold in return for each valuable information.
It's best to start off with Margret. If you managed to save her, you can find her at the marketplace or the Silver-Blood Inn, where she lives. Speak to her to receive some not very useful information which you shouldn't depend on too much. If she got killed at the beginning of this mission, you will have to head to the inn either way and speak to the innkeeper, Kleppr. He will tell you that the woman rented the best room for a whole month and paid in advance. Ask him if he has the key to receive a positive response, though he won't be too eager to give it to you. Of course in order to push the investigation further, you will need to reach the murdered woman's room. You can learn how to get the key from the Obtain the key to Margret's room section.
After you obtain the key or just break into the room, you should take a look around it. You can find some interesting items there, but by far the most important one can be found in the nightstand, namely Margret's Journal. Read it to make the whole situation a bit clearer (see: Read Margret's Journal).
If you decide to take care of Weylin first, you should head to The Warrens in Markarth, where the man used to sleep. Head there to meet Garvey, who manages this building (screen above). He will tell you that this place is a flophouse for the poor. Ask him about o Weylin to learn that he has lived here his whole life - Garvey has the key to his room. You can try to persuade him to give it back to you (Speech), bribe him, intimidate or even steal from him - the choice is all up to you. Even if you don't manage to obtain the key, you can break into Weylin's room and there, inside a chest, find his notes (see: Read Weylin's Note).
New optional objective: Obtain the key to Margret's room
The item you're looking for can be found in a few ways. The most important role is of course played by the innkeeper Kleppr. If you have high Speech, you can try to persuade to give you the key, or alternatively bribe or intimidate him. If you're not satisfied with such solutions, you can always sneak up to him and try pickpocketing. It's however rather difficult, as there are many clients inside the inn.
If none of the attempts succeeds, you can always open the door to Margret's room by using a picklock and avoiding any problems connected with obtaining the key.
New main objective: Read Margret's Journal
Open the journal to learn that the woman was an agent of General Tullius, who's role was to learn more about the Silver-Blood and their Cidhna Mine. Thonar Silver-Blood seemed especially interesting to her. Unfortunately the notes will state that Margret didn't do too well and that she fears about her life. You know the further turn of events.
It's obvious that you should now head to speak with Thonar Silver-Blood. I wouldn't suggest rushing with it, but taking care of Weylin first. If you speak with Thonar, your quest giver might have a very nasty accident and you won't receive your payment.
New main objective: Find evidence about Thonar
Head to The Treasury House in Markarth and speak with Rhiada, who's standing behind the counter. Ask her about Thonar to learn that he doesn't want any visitors. Traditionally, you can try bribery, intimidation or persuasion and if that's not enough, there's always the option of breaking into the man's room.
Regardless of how you reach Thonar, he won't be pleased with your visit. He will tell you to leave his house, threatening to call the guards otherwise. As you try to leave, quite unexpectedly a group of mage-assassins will rush into the house and kill Thonar's wife (screen above). Silence them and you will be able to question Thonar in return. He will tell you that he's commanding the Forsworn. Try asking him any additional questions and you will be asked to leave. Margret's plot ends here - you should now take care of Veylyn (if you haven't done it yet).
New main objective: Read Weylin's Note
Open the note found in Veylin's room to find as short letter that the assassin received from a mysterious "N". From the brief instructions you will learn that his objective should be to put fear into the Nord hearts.
AT this point you should learn who the mysterious "N" is and speak to him about the assassination. It's important to meet with Elthrys before heading to the letter's author, as when you meet with him a nasty accident will happen to your quest giver and you won't be able to receive a prize from him.
New main objective: Find out who "N" is
Head out of The Warrens and you will be approached by Dryston who will start attacking you. You don't have any choice - you need to fight him. Remember not to use any weapon - that way you would only draw the guards' attention and receive a fine, which you would certainly rather avoid.
Knock out Dryston to learn that he was sent by a man named Nepos. He is the mysterious "N" who you're looking for. Quickly head to Elthrys - he has a prize for you, which you might not be able to collect later on.
New main objective: Find evidence about Nepos
Enter Nepos' house and you will be stopped by his housekeeper who will tell you to leave at once. As you're about to head out, you should hear the old man's voice, telling that he can find a moment to meet with you. Speak to him.
Without much delicacy, Nepos will reveal he's a Forsworn agent following the order of their King. Ask him why he's telling you all of this to learn that you're not going to get out of here alive anyway. You will have to choice but to kill the old man and his three servants - including one mage. Despite what it might seem like, it's not a difficult fight, as your opponents aren't too experienced. After defeating them, rob whatever you like from the dwelling, specially the Mystery of Talara, Book IV which can boost your Illusion.
New main objective: Return to Eltrys
Regardless of whether you spoke with Nepos, Thonar or both, the story will have the same finale. Head to the Shrine of Talos, where you usually met with Eltrys, to find his dead body surrounded by three city guards. They will tell you that's how everyone who dares to oppose the Forsworn ends. They plan the same faith for you.
You definitely shouldn't resist the guards - the whole of Markarth guard is connected with the conspiracy. Even if you manage to kill the enemies inside the Shrine of Talos, you can expect hostility from a few dozens of guards patrolling the streets. If you escape the city and return later on, you will still be considered a public enemy. There's also the problem of a large fine that you will have to pay in return for each guard you kill, making it far more painful. It's best to just go to prison - it's connected with another side quest, namely No-one Escapes Cidhna Mine.
Side quest unlocked: No-one Escapes Cidhna Mine