From the Old D&D Gazeteer setting 80's-90's
The first mention I've found of these Elves, are as Shadow Elves from the D&D Gazetteer setting back in the 80's and early 90's. Carl Sargent and Gary Thomas authored.
They once lived on the surface, over 6,000 years in the past. They lived peacefully until their lives were shattered by the Great Rain of Fire , the planetary axis shifted, cuasing climatic upheaval. Blackmoor was coverd in Ice. The elves fled to the Broken lands, and were driven underground for the first time in history.
The elves underground made the best of a bad situation, they cultivated fungus and created new forms to suit their needs. The elvish wizards among them worked hard to produce new plants which could survive in the radically changed environment the elves were now in. They feared approaching the surface ans so withstood this way of living for as long as they could
They attempted to return to the surface, and settled in a land now called Glantri. around 1050 years later. This did not last, arount 200 years later. Elves found a strange artifact from the Blackmoor civilization, and it exploded catyclysmically. Great clouds of smoke and ash rose into the sky and did not disperse for years. A rotting plague affected many creatures in the area with the ancestors of the shadow Elves partly affected, when the first felt the explosion and saw the clouds, they fled for the caves below out of instinct and racial memory.(Probably saving them from extinction). They resumed their subterranean life. They settled ever deeper, until finding a cavern written with inscriptions by an Immortal. with 14 verses promising protection. The settled and erecteed a Temple to the Immortal.
Lifed became better for the elves, and over the centuries other cities were built. They lived in relative peace except for one humanoid invasion until around 4000 years after the start of all this, groups of elves ventured to the surface, and found only a fiery, deadly sun. They wrongly concluded, after coming up in the Broken Lands, that the surface was still uninhabitable and probably would be forever.
Another 200 years later, and a party of adventurers were found, questioned and executed. To the Elves astonishment, they found that the surface had become inhabitable centuries befoe, and entire nations of elves existed. A delegation was sent to the surface, and approached the Kind of Elves on the surface, in Alfheim. He welcomed them, and was taken aback, that the population of elves below, was equal to that of Alfheim. The Shadow Elves demanded reparations for their long neglect in the tunnels beneath the Broken Lands. They were outraged that they had been abandoned below. They demanded more than half of the lands of Alfheim, Even Though they knew they were reconciled to their underground lives and the sunny summer of Alfheim hurt their skin and eyes. The final straw was their demanding the leadership of the country. They left no room for compromise. The Shadow elves returned home threatening war.
20 years later, the Shadow elves infiltrated lands held by Orcs and other Humanoids, and manipulated the tribal chiefs into attacking Alfheim. Little was accomplished against the well prepared Elves.
240 years later, this was attempted again, and failed, 150 years after that, they attempted an attack of their own, which was put down.
The Shadow elves then decided to use stealth, and infiltrated Alfheim, one spy broke the silence, and all were purged from Alfheim. They now are actively using stealth and subterfuge to take revenge on the surface dwellers.