'm currently writing a campaign in which …

'm currently writing a campaign in which a black dragon is attempting to achieve lichdom. A black dragonborn necromancer (disguised as a copper), and thrall to said dragon, has been traveling with the party since the beginning of the campaign. I'm trying to make it so that the party unwittingly assists the necromancer in helping the dragon achieve lichdom under the guise of killing it, but I'm unsure how to achieve this effect. Any advice? (paladin directed me over here after I asked him)

Becoming a Lich involves the creation of a phylactery, a process that is deeply personal, varies from person to person, and requires various components; culminating in a necrotic ritual. Perhaps on their adventure, the players are unknowingly helping this thrall collect components that their draconic patron needs for the ritual.

The details on the ritual are never fully explained in any sourcebook afaik, but I vaguely remember it being implied that it involves ritualistic self-sacrifice. Depending on how devious you wanna be, the party could end up being the ceremonial dagger that kills the dragon during their lichdom ritual, only for it to rise as a lich immediately after.