Vecna was controlled by Mind Flayer but by the end he chooses to not to resist and be a part of the evil entity.