Vecna is one of the most iconic villains in the "Dungeons & Dragons" universe, particularly within the Greyhawk campaign setting. Here is an overview of his backstory based on the lore provided through various sources:

Early Life and Rise to Power:

Vecna was born as a human in the city of Fleeth in the Sheldomar Valley on the world of Oerth, part of the Greyhawk setting. He was of Flan descent, from the untouchable caste. His mother, Mazzel, taught him the basics of magic but was later executed for practicing witchcraft.
Swearing vengeance, Vecna studied magic under the tutelage of Mok'slyk the Serpent, an entity believed to be the personification of arcane magic itself. Over centuries, he became one of the most powerful wizards known, achieving lichdom to escape mortality.
He built a vast empire known as the Occluded Empire or Ykrathian Empire, ruling from his stronghold, the Rotted Tower, in the Rushmoors. His rule was tyrannical and cruel, involving dark magic, necromancy, and conquest. One of his major acts was the destruction of the city of Fleeth.

Betrayal by Kas:

Vecna's most trusted lieutenant was Kas, also known as Kas the Bloody-Handed. Vecna crafted a powerful sword for Kas, which later became known as the Sword of Kas. However, Kas betrayed Vecna, using this very sword to attempt to destroy him. This betrayal led to a cataclysmic battle where both were supposedly destroyed, leaving only Vecna's hand and eye as relics.

Lichdom and Godhood:

Despite his apparent destruction, Vecna's legend lived on through his artifacts, the Eye and Hand of Vecna, which carried immense magical power and could corrupt those who used them. These artifacts are central to many stories involving Vecna.
Vecna eventually returned as a lich, not content with mere undead existence. His ambition was to ascend to godhood, which he eventually achieved. His ascent to divine status was detailed in adventures like "Vecna Lives!" where he became a demigod of evil secrets and magic.
His divine status was further explored in the adventure "Die Vecna Die!" where he attempted to rewrite reality itself, nearly achieving omnipotence by absorbing the power of Iuz. However, he was thwarted by adventurers and ended up in Ravenloft, only to return to Oerth later, diminished but still a significant threat.

Current Status:

In modern D&D lore, Vecna remains a lesser god, wandering the planes, collecting secrets, and plotting to overthrow the other deities to rule over the universe. His worship is secretive, with his cultists infiltrating societies, gathering knowledge, and preparing for his eventual return to power.
His relics, the Hand and Eye of Vecna, continue to play significant roles in adventures, tempting heroes with dark power but at great cost, often leading to their corruption or downfall.

Cultural Impact:

Vecna's story has been expanded upon over the years, with each new edition of D&D adding layers to his lore. He has become a symbol of ambition, the dangers of unchecked power, and the enduring nature of evil within the D&D community.

This outline of Vecna's backstory reflects the narrative developed across multiple D&D products, from early modules to contemporary editions, showcasing his evolution from a powerful lich to a god of dark secrets.