New primary objective: Talk to Nazir
Locate Nazir and walk to him to start a conversation (screen above). Tell him that the Night Mother has spoken to you and she wants you to finish a started contract connected to assassination of the emperor. Nazir will approve that and tell you about his plans to move the Dark Brotherhood hideout to the previously explored Dawnstar Sanctuary.
New primary objective: Talk to Amaund Motierre
Leave the Dark Brotherhood's Sanctuary, open the world map and decide to fast travel to Whiterun. Once you get there, find the Bannered Mare inn, which you've probably visited already during completing the contract to kill Gaius Maro.
You'll find Amaund Motierre in one of the quest rooms and you have to start conversation with him. The man will be glad to hear that you want to complete the contract and will tell you that the real emperor resides currently on the ship called Katariah, anchored in a bay near Solitude. You might also ask Amaund about current commander Maro location (screen above), so you can take revenge on him. It will lead to unlock an optional objective of this mission.
New primary objective: Board the Katariah
New optional objective: Kill Commander Maro
I suggest eliminating commander first. Exit the inn, open the world map and decide to travel to East Empire Company Warehouse (screen above). If you haven't discovered this location yet, then you should start in Solitude and then go to docks. Note - if you're still wanted by Skyrim guards, then after getting to the destination you'll be forced to solve this matter. I suggest paying a fine, but you might as well go to jail for few days. Anyway, you do not have to worry that emperor's ship sails away suddenly.
You should find commander Maro on one of the wooden bridges in docks, but I do not recommend talking to him, because you would alarm local guards this way. Instead, wait for the dusk, so most of the guards will leave this area. Approach commander carefully, make sure that you're in hiding (you have to crouch) and stab him in the back (screen above). You should use a good weapon to kill him (Blade of Woe for example, obtained in the previous quest), to make sure that you need only one attack. Quickly move away from the murder place, before someone notices you.
We can now deal with boarding to the emperor's ship. Head east and after few moments you should see the ship. Jump into water and swim towards Katariah. Explore it from the east side and you should see an anchor chain. Swim towards it and press E key, so you will be automatically moved to the lower deck.
Markings on the map: 1 - Start place; 2 - Kitchen; 3 - Stairs; 4 - Closed door (expert or key); 5 - Captain Avidius's cabin; 6 - Lieutenant Salvarus's cabin; 7 - Stairs; 8 - Passages to upper deck; 9 - Emperor's closed cabin (master or key).
You can get inside the emperor's cabin in two different ways. First option is to sneak and stay in hiding all the time. Another variant is to eliminate all opponents along your way. As sneaking is more demanding, we will describe it in details. Before taking any action, make sure that your thieving skills are high enough or you have proper potions and spells to make you temporarily invisible (you can always leave the ship and return here later). Head south, following one of the sailors, who is joined by another one after a while (screen above).
Stop in a place, where the second sailor appeared, and that's because one more sailor will come out from the room visible in a distance. If possible try to check from time to time if he already entered the kitchen located on the right. Once he did it, carefully approach the kitchen (screen above).
Now you have to wait until Penitus Oculatus agent appears in the left. He should walk to the right and sit at the bar (screen above). Approach him carefully, but watch out for the man with a flute standing near. Try to stay out of his sight. Make sure that it is safe and use the nearby north-western stairs.
If you've done all steps according to the plan, you should find yourself next to the closed door, with expert difficulty level lock (screen above). The simplest solution is of course to use lockpicks to open this door.
The problem with closed door can be also solved in another way. Head south and use the invisibility to pass by two agents. Enter the captain Avidius's cabin located to the right (screen above) and pickpocket the Katariah Master Key from him.
After you've successfully opened the north door (by using lockpicks or a stolen key), you could start exploring the northern part of the ship. Watch out for opponents staying in cabins there. You can encounter lieutenant Salvarus among others. Move north (screen above) and then use the stairs on the right (or on the left). After a while you'll face the emperor's cabin.
A northern closed door, mentioned above, can be bypass in a different way. Head south, using the invisibility when needed. In the southern part of the ship you'll find a ladder (screen above) leading to the upper Katariah deck. But be warned, because this area is full of opponents, so you would have to be very careful. Look for a northern door on the upper deck. After opening them you would find yourself next to the emperor's cabin.
Finally, a few words about aggressive variant. If you're going to eliminate all opponents on your way, the biggest battle will probably take place in the main room of the ship, which is the kitchen. You have to watch out particularly for both officers mentioned previously - captain Avidius and lieutenant Salvarus (screen above). Use the Katariah Master Key found at Avidius's corpse to open the first door or walk through the upper Katariah deck, reaching the emperor's cabin.
The door leading to the emperor's cabin unfortunately has master difficulty level lock (screen above), however you can open it by using the Katariah Master Key (in possession of Avidius and Salvarus). If you've avoided these persons so far, you have to decide whether you try opening the door using lockpicks or return to mentioned officers and pickpocket or kill them.
The meeting with the emperor will probably surprise you a little, because he won't try to flee nor fight with you, knowing that his time has come. Titus Mede II has however the last request before his death. He wants you to murder a person who sentenced him death, which is Amaund Matierre. You can promise him to think about it (screen above) or refuse to do it. Then kill Titus with any weapon.