The Prophet ﷺ said, "Shall I not inform you of the greatest of the major sins?" He said this three times. "Associating partners with Allah, disobedience to parents, and false testimony," or he said, "speaking falsehood."The Messenger of Allah ﷺ had been reclining, but then he sat up and kept repeating it until we said to ourselves, "If only he would stop."
قال النبي ﷺ: ألا أنبئكم بأكبر الكبائر؟ - ثلاثا- الإشراك بالله، وعقوق الوالدين وشهادة الزور أو قول الزور. وكان رسول الله ﷺ متكئا فجلس، فما زال يكررها حتى قلنا: ليته سكت.
Bukhari narrated it in the Book of Testimonies (2654), and Muslim in the Book of Faith (87: 143), both of them by way of Saeed Jariri, who said, Abdul-Rahman bin Abu Bakrah narrated to us, from his father, who said, and then he related it. The wording given here is that of Muslim.