The Ancient Jewel can be obtained by either going to the Dreadlands biome in the Dreadlands dimension and taking it from the treasure box in the Dread Castle, or it is sold for a stack of emeralds and 4 amethyst shards by the Cosmologist only after you have already obtained the jewel from the Dreadlands' treasure box. The Ancient Jewel is an ingredient in the Neptunium Crystal, which is crafted at a Haven Altar.