D'Hoffryn's History
Creating Anyanka
In Sjornjost, Sweden, 880, the act of vengeance of a woman named Aud against her lover Olaf gained the attention of D'Hoffryn. Impressed, he offered her a position as vengeance demon and identified her true name as Anyanka. She accepted and became the Patron Saint of Scorned Women.
In 1998, Anyanka was robbed of her powers by an alternate version of the Watcher Giles while attempting to exact vengeance on behalf of Cordelia Chase. D'Hoffryn refused to help her, leaving Anya stuck as a human again.
Recruiting Willow
D'Hoffryn attempted to convince the young witch Willow to become a vengeance demon after Oz left her. The break-up caused her to cast a spell that resulted in her accidentally making Giles blind, turning Xander into a demon magnet, and Spike and Buffy becoming engaged.
D'Hoffryn was impressed by Willow's fury and the chaos it caused, so he forcibly teleported her to his dimension Arashmaharr to complete the conversion. Willow declined the offer — although she did request D'Hoffryn's help in ending the spell —, but D'Hoffryn left his talisman to summon him in case she changed her mind.
Anya's dilemma
Two years later, D'Hoffryn was a guest at the failed wedding of Anya and Xander. While acting almost father-like during the wedding, after Xander left Anya at the altar, D'Hoffryn convinced her to become a vengeance demon once again.
Anya's second stint as a vengeance demon was short-lived, her time as a human made her uncomfortable about unleashing vengeance like she had before, and during a confrontation between Anya and Buffy, Willow used the talisman D'Hoffryn had left her to help put a stop to the fighting. D'Hoffryn asked Anya what she wanted, and she said that she wanted to reverse the vengeance she had exacted which had caused a massacre at a frat house. D'Hoffryn granted her wish, telling her that it would require the sacrifice of a vengeance demon's body and soul. Believing she was about to die, Anya was resigned to her fate only to watch helplessly as D'Hoffryn summoned her friend Halfrek and immolated her instead. D'Hoffryn then left, disgusted with Anya, though not before rendering her human again and leaving the warning: "From beneath you, it devours."
Despite his philosophy, "Never go for the kill when you can go for the pain," D'Hoffryn sent at least two demon assassins after Anya. They were both defeated, respectively by Buffy and Spike.
Magic Council
Having a board meeting with Anya, Jonathan and the other vengeance demons.
Preceding the end of magic, D'Hoffryn joined a Magic Council meant to deal with the growing threat of Severin the Siphon. He, along with the Brahma, was one of only two members of the council to survive the destruction of the Deeper Well and witness the return of magic.
Although D'Hoffryn collaborated with Buffy and the Scoobies to write up new rules about how the Magic Council would maintain the new rules of magic, it was later revealed that he had worked in a crucial clause to their rules; while the Scoobies had stated that each member of the council would have a particular power tied to their position, D'Hoffryn included a loophole that another member would inherit those powers if a Council member was killed until a replacement could be appointed, thus allowing him to eliminate the rest of the Council and take their powers of himself.
It was also revealed that D'Hoffryn created a ghostly copy of Anya that had been haunting Xander, considering her what Anya should have been after she felt rejected at Xander's decision to follow Dawn into another reality rather than stay with her. He is also allied himself with a fully-restored copy of Jonathan as part of his campaign, with Jonathan's vendetta against the Scoobies helping to refine D'Hoffryn's actions by giving him actual wishes to grant.
Death
D'Hoffryn's intention was to free the power of vengeance demons from the whims of humans. However, Buffy prevented D'Hoffryn from being able to write in the handbook himself by telling various members of the magical community to not believe in D'Hoffryn's powers. D'Hoffryn quickly concluded that he should eliminate Buffy, so he stormed her apartment along with Jonathan, Anya's ghost and two other vengeance demons. D'Hoffryn scorned Xander for breaking Anya's heart, and Xander retorted that D'Hoffryn never cared for her from the beginning. D'Hoffryn then allowed Anya have her say, and she uses her power to avenge herself by incinerating Xander so he'd then be the ghost.
However, as Buffy began to regret her decision to bestow such powers to the council, Anya granted Buffy's vengeance wish to remove all of D'Hoffryn's council powers. Anya then brought Xander back - having simply turned him into an intangible, invisible, and inaudible state rather than actually killing him -, and D'Hoffryn threatened the Scoobies with his remaining powers. Anya tried to use her powers to protect them, but D'Hoffryn burnt her to death. For betraying one of his own, Johnathan and the other vengeance demons teleported away to leave D'Hoffryn to face the Scoobies alone. Despite D'Hoffryn's confidence in his great power, Buffy cut his hand off with the Scythe, which caused him to immediately teleport back to Arashmaharr to get his limb regenerated.
The Scoobies teleported after him in the dimension's medical center, using Dawn's key powers which were restored by the Slayer Handbook, which D'Hoffryn had left behind during the assault. D'Hoffryn attempted to bribe his way out by offering to grant each Scooby a wish. They all saw through this, knowing that there would always be a catch. Willow and Giles used magic to hold D'Hoffryn down while Buffy struck him with her scythe, beheading and killing him.