Abu Abdullah Ja’far Bin Muhammad (as) said :
On the Day of Judgement, a caller will call from inside the Throne, “Where is
Allah’s Caliph on His land?” So, Prophet Dawud (as) will stand up. But a Call will come from the side of Allah, the Mighty and the Majestic : ‘We did not Intend it to be you, and indeed you were a Caliph of Allah’.
Then the caller will call out for the second time : “Where is Allah’s Caliph on His land?”
So Amir Al-Momineen Ali ibn Abi Talib (as) will stand up.
Then will be a Call from the side of Allah, the Mighty and the Majestic: “O the group of creatures! This is Ali Bin Abi Talib (as), the Caliph of Allah on His land and His Proof over His servants. So, whoever attached himself to His rope in the house of the world should attach himself to His rope on this Day. He would be illuminated by his (as) light and will follow him towards the highest levels of the Gardens”.
Then Abu Abdullah (as) said: ‘So the people would arise, those who had attached themselves to his (as) rope in the house of the world. They will follow him (as) towards the Paradise’.
Then a Call will come from the side of Allah, the Mighty and the Majestic : ‘Indeed! The one who followed an Imam in the house of the world, so he should follow him to wherever he (as) goes, with him.
166 إِذْ تَبَرَّأَ ٱلَّذِينَ ٱتُّبِعُوا۟ مِنَ ٱلَّذِينَ ٱتَّبَعُوا۟ وَرَأَوُا۟ ٱلْعَذَابَ وَتَقَطَّعَتْ بِهِمُ ٱلْأَسْبَابُ
167 وَقَالَ ٱلَّذِينَ ٱتَّبَعُوا۟ لَوْ أَنَّ لَنَا كَرَّةً فَنَتَبَرَّأَ مِنْهُمْ كَمَا تَبَرَّءُوا۟ مِنَّا ۗ كَذَٰلِكَ يُرِيهِمُ ٱللَّهُ أَعْمَـٰلَهُمْ حَسَرَٰتٍ عَلَيْهِمْ ۖ وَمَا هُم بِخَـٰرِجِينَ مِنَ ٱلنَّارِ
“[2:166] When those who were followed shall renounce those who followed (them), and they see the chastisement and their ties are cut asunder (apart)
[2:167] And those who followed shall say: Had there been for us a return, then we would renounce them as they have renounced us (today). Thus will Allah Show them their deeds to be of intense regret to them, and they shall not come forth from the Fire”.
Ref : Bashaartul Mustafa, Chp.1, H.1
What is the relevance of the Quranic verses mentioned with the above text?
The Text, “Whoever followed Imam Ali (as) in this world will be attaching himself to Imam Ali (as) on the Day of Judgement” is in relevance to the quranic verse such that whoever followed someone other than Imam Ali (as) will be renounce by the one whom they follow. Even after Allah appointing Imam Ali (as) as His caliph in this world, he was betrayed and oppressed, thus on the day of judgement when Allah Himself will be calling His Caliph on his land, so people who followed other than Imam Ali (as) would be seeking help from them as they followed others in this world while they will be renounce by their own “so called caliph”. Further, the next quranic ayah explain, people who followed other than Imam Ali (as) would be desiring to be return to this world again so that they can renounce whom they followed in this world, but there would be no return for them.