It is proven in the saheeh Sunnah that the Qur’an will intercede for its companions on the Day of Resurrection. Muslim (804) narrated that Abu Umaamah al-Baahili said: I heard the Messenger of Allah (blessings and peace of Allah be upon him) say: “Read the Quran, for it will come on the Day of Resurrection interceding for its companions.”
Imam Ahmad (6589) narrated from ‘Abdullah ibn ‘Amr (may Allah be pleased with him) that the Messenger of Allah (blessings and peace of Allah be upon him) said: “Fasting and the Qur’an will intercede for a person on the Day of Resurrection. Fasting will say: O Lord, I kept him from his food and desires during the day; let me intercede for him. And the Qur’an will say: I kept him from sleeping during the night; let me intercede for him. And they will be allowed to intercede.”
Classed as saheeh by al-Albaani in Saheeh al-Jaami‘, 7329
Just as the Qur’an will intercede for its companions on the Day of Resurrection, it will also testify against those who went against it by neglecting it, ignoring its obligations and transgressing against the limits it set.
Muslim (223) narrated that Abu Maalik al-Ash‘ari said: The Messenger of Allah (blessings and peace of Allah be upon him) said: “The Quran is evidence for you or against you.”
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said:
Either it will be for you, if you sought to draw close to Allah means of it, and you fulfilled the obligations towards the Holy Qur’an, namely believing its stories, obeying its commands, heeding its prohibitions and venerating and respecting the Holy Qur’an, in which case it will be proof for you,
Or it will be the opposite, if you disrespected the Qur’an and neglected its words and meanings and failed to act upon it, and you did not fulfil the obligations towards it. In that case it will be a witness against you on the Day of Resurrection.
Ibn Hibbaan narrated in his Saheeh (124) from Jaabir that the Prophet (blessings and peace of Allah be upon him) said: “The Qur’an is an intercessor whose intercession will be accepted and an opponent whose testimony will be accepted. Whoever puts it in front of him, it will lead him to Paradise, and whoever puts it behind his back, it will drive him to Hell.”
And Allah knows best.
(Source - Islam Q&A)