This Article Contains Spoilers - WARNING: This article contains major spoilers. If you do not wish to know vital information on plot / character elements in a story, you may not wish to read beyond this warning: We hold no responsibility for any negative effects these facts may have on your enjoyment of said media should you continue. That is all.
As the heroes travel around Ferelden on their quest to expose Loghain and stop the Darkspawn, nearly all the villains and hardships they encounter are in some way caused by Loghain or at least done by someone supporting him. He has hired assassins to kill the Grey Wardens, allowed Arl Howe to torture innocent people in his dungeon, and enabled slavers to kidnap citizens in the Denerim Alienage. He has also made questionably competent attempts to get the Circle of Magi and the dwarves of Orzammar on his side, the latter of which backfired and the former of which backfired spectacularly.
Towards the end of the game, a “Landsmeet” is called between Loghain and those in support of the main characters, where a large argument occurs in which Loghain defends his actions by saying it was the king’s fault for getting himself killed by directly commanding his troops from the front lines, which was due to him believing the Grey Wardens’ misleading tales portraying war against the Darkspawn as glorious and relatively simple, and that Loghain was required to enable these atrocities for the sake of the war effort in order to avoid being destroyed by the Darkspawn.
A massive fight then breaks out, but an old woman councilor quickly stops it and calls for order. It is decided that Loghain and a champion representing the heroes should have a duel to decide the issue, and the player can choose any playable character to fight him. Afterwards, Loghain surrenders and if you spare him, Alistair, who was the king’s bastard son and thus technically the rightful heir to the throne, is outraged and absolutely refuses to let Loghain live. Unless you allow Loghain to be killed, Alistair will refuse to travel with you further; if he was persuaded to become more selfish than his natural state, he can be persuaded to take the throne alongside Anora, but otherwise he must either be executed or exiled.
If spared, Loghain is punished by being put through the “Joining” ritual to become a Grey Warden, which consists of drinking Darkspawn blood, and is very painful and often fatal. Loghain survives and then becomes a playable character for the remainder of the game and the final battle.
When it is explained that the Archdemon Urthemiel can ‘’only’’ be killed by a Grey Warden, and that the Grey Warden in question dies afterwards, Morrigan offers to avoid this by having sex with a male Grey Warden (this can be either Loghain or a male PC) in a dark magic ritual which will impregnate her and produce a demonic baby who will absorb the soul of the Archdemon and become an “Old God”. If this offer is declined, depending on how the final boss fight is played, Loghain will die if he is the one to deliver the final blow to the Archdemon.
If Loghain is spared at the Landsmeet and not allowed to die in the final boss fight of Origins, he is encountered in a short cameo in the expansion, where it is revealed that he has been reassigned to the neighboring country Orlais, which at one point ruled Ferelden. Given that he was to a large degree responsible for Ferelden's successful rebellion against Orlais, he is not optimistic about his reception there.
If he is still alive at the end of Origins, Loghain also appears in Dragon Age: Inquisition. The Grey Wardens have been tricked by the Nightmare Demon that serves Corypheus into believing that the effects of the Joining will soon kill them, and most have gotten behind Livius Erimond and Clarel de Chanson's efforts to destroy the two remaining potential Archdemons before they can rise. Loghain, however, has seen where rationalizations of the greater good can lead and speaks against this plan. For this he is chased from the Order and has to flee assassination attempts. He eventually attempts to stop the plan with the aid of the Inquisition and the Champion of Kirkwall, but in the battle that ensues he, Hawke, and the Inquisitor are thrown into the area of the Fade ruled by the Nightmare Demon. Either Hawke or Loghain needs to be left in the Fade to distract the demon, and whoever is left behind is presumed dead.
If Loghain isn't left in the Fade, he is the senior member of Grey Wardens in Ferelden and Orlais, and either leads them into exile at Weisshaupt Fortress or leaves them to serve the Inquisitor while he tells the Wardens at Weisshaupt what happened.