Instead of finding treasure, he frees Graven, a wizard who had been imprisoned in a magical prison for his transgressions.
Instead of finding treasure, he frees Graven from a magical prison. Graven is a wizard who had been imprisoned for his transgressions.