The shadow diamond is one of the four Diamonds of Azzanadra which must be obtained during the Desert Treasure quest. It is located in the Shadow Dungeon and is obtained by killing both of Damis' forms.
It is recommended that players deposit this gem on the bank as soon as they obtain it, along with the other Diamonds of Azzanadra, as a level 95 stranger may appear and attack them if they are holding one of them. The more diamonds you have on you, the more likely the stranger will appear and attack you.
For an exhaustive list of all known sources for this item, see here