You are most likely thinking of the Marut, a powerful construct/outsider (depends on the edition) that hunts those who cheat death, and has been in every edition since AD&D.
What they are like for each edition:
1e AD&D - In 1e, They are the most powerful variety of inevitables, and although only a little information is given, it is mentioned how 'severity' plays a large role in their decision to pursue a target (sacrificing a city for immortality will likely draw their attention, while casting Ressurection once will not). They have a minimum of 15 HD, and advance up to 45. Although created with a divine mandate, these Maruts are constructs.
2e - 2e Maruts are very different from their original representation; they are celestial emmisaries who serve no particular purpouse, although their powerful single-target damage leads them to be sent to hunt individuals. They don't even have their signiature lightning and thunder fists in this edition! They do still have 15 hit dice, though.
3.5e - 3.5 Maruts are carbon copies of their 1e counterparts.
4e - Maruts are more similar here to their version from 2e, semi-celestial creatures that may be on any of a variety of tasks, but in the end serve the order of the universe as a whole.
5e - 5e statblocks are less readily available (it is the current edition), but this version seems more similar to the 2nd and 4th edition versions than the 1st and 3rd, being an enforcer of contracts rather than of death.
Pathfinder - Pathfinder seems to take off of the 3.5 interpretation, which isn't surprising. This holds true for Pathfinder 2e as well.