Mishkat al-Masabih 61
Mu'adh said:
God’s messenger recommended ten things to me saying, “Do not associate anything with God, even if you are killed and burnt on that account; do not be disobedient to your parents, even if they command you to quit your family and your property; do not deliberately neglect to observe a prescribed prayer, for he who deliberately neglects to observe a prescribed prayer will have God’s protection removed from him; do not drink wine, for it is the beginning of every abomination; avoid acts of disobedience, for on their account God’s wrath descends; beware of running away from the line of battle, even if the people perish: when people are smitten by death when you are among them, stay where you are ; spend on your children out of your means; do not refrain from using the rod in training them; and cause them to fear God.” 

Ahmad transmitted it.
عَنْ مُعَاذٍ قَالَ: أَوْصَانِي رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ بِعَشْرِ كَلِمَاتٍ قَالَ لَا تُشْرِكْ بِاللَّهِ شَيْئًا وَإِنْ قُتِلْتَ وَحُرِّقْتَ وَلَا تَعُقَّنَّ وَالِدَيْكَ وَإِنْ أَمَرَاكَ أَنْ تَخْرُجَ مِنْ أَهْلِكَ وَمَالِكَ وَلَا تَتْرُكَنَّ صَلَاةً مَكْتُوبَةً مُتَعَمِّدًا فَإِنَّ مَنْ تَرَكَ صَلَاةً مَكْتُوبَةً مُتَعَمِّدًا فَقَدْ بَرِئَتْ مِنْهُ ذِمَّةُ اللَّهِ وَلَا تَشْرَبَنَّ خَمْرًا فَإِنَّهُ رَأَسُ كُلِّ فَاحِشَةٍ وَإِيَّاكَ وَالْمَعْصِيَةَ فَإِنَّ بالمعصية حل سخط الله عز وَجل وَإِيَّاكَ وَالْفِرَارَ مِنَ الزَّحْفِ وَإِنْ هَلَكَ النَّاسُ وَإِذا أصَاب النَّاس موتان وَأَنت فيهم فَاثْبتْ وَأنْفق عَلَى عِيَالِكَ مِنْ طَوْلِكَ وَلَا تَرْفَعْ عَنْهُمْ عَصَاكَ أَدَبًا وَأَخِفْهُمْ فِي اللَّهِ. رَوَاهُ أَحْمَدُ