All praise is due to Allah, and may peace and blessings be upon the Messenger of Allah.
First: Where does the jinn companion go after a person’s death?
This is a matter of the unseen for which there is no evidence in the Qur’an or Sunnah explaining what happens to a person’s jinn companion after their death. Therefore, it is not permissible to assert anything about it without authentic Islamic evidence.
Allah, the Exalted, says:
“And do not pursue that of which you have no knowledge. Indeed, the hearing, the sight, and the heart—all of those will be questioned.” [Al-Isra: 36]
Second: Can sorcerers summon the jinn companion to learn its owner’s secrets?
There is no evidence proving that it is possible to summon the jinn companion of a deceased person and learn the secrets of their life through it.
Even if someone claims that the being speaking is the person’s jinn companion, they should not be believed. Devils frequently lie and may reveal false information to ruin relationships and stir up hostility and hatred.
The Prophet ﷺ said about the devil who told Abu Hurairah (may Allah be pleased with him) about the virtue of Ayat al-Kursi:
“He told you the truth, although he is a liar.” Narrated by Al-Bukhari.
Conclusion: We do not know where a person’s jinn companion goes after their death, and there is no Islamic evidence proving that sorcerers can summon it to learn its owner’s secrets. A Muslim should not become preoccupied with unseen matters for which there is no evidence. Rather, it is better to focus on what benefits them in their religion and worldly life.
And Allah knows best.