Sunan an-Nasa'i, Volume 4, Book 35, Hadith 3795 (DarusSalam)

It was narrated that Ibn 'Umar said: "The Messenger of Allah said: 'Whoever swears, let him not swear by anything other than Allah.'" The Quraish used to swear by their forefathers, and so he said: "Do not swear by your forefathers."

أَخْبَرَنَا عَلِيُّ بْنُ حُجْرٍ، عَنْ إِسْمَاعِيلَ، - وَهُوَ ابْنُ جَعْفَرٍ - قَالَ حَدَّثَنَا عَبْدُ اللَّهِ بْنُ دِينَارٍ، عَنِ ابْنِ عُمَرَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ مَنْ كَانَ حَالِفًا فَلاَ يَحْلِفْ إِلاَّ بِاللَّهِ ‏"‏ ‏.‏ وَكَانَتْ قُرَيْشٌ تَحْلِفُ بِآبَائِهَا فَقَالَ ‏"‏ لاَ تَحْلِفُوا بِآبَائِكُمْ ‏"‏ ‏.‏

sunnah.com