كتاب البر والصلة والآداب
45  
The Book of Virtue, Enjoining Good Manners, and Joining of the Ties of Kinship
(36)
Chapter: The Virtue Of Removing A Harmful Thing From The Road
(36)
باب فَضْلِ إِزَالَةِ الأَذَى عَنِ الطَّرِيقِ، ‏ ‏
Sahih Muslim 1914 c

Abu Huraira reported Allah's Messenger (ﷺ) as saying:

A person while walking along the path saw the branches of a tree lying there. He said: By Allah, I shall remove these from this so that these may not do harm to the Muslims, and he was admitted to Paradise.
حَدَّثَنِي زُهَيْرُ بْنُ حَرْبٍ، حَدَّثَنَا جَرِيرٌ، عَنْ سُهَيْلٍ، عَنْ أَبِيهِ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ مَرَّ رَجُلٌ بِغُصْنِ شَجَرَةٍ عَلَى ظَهْرِ طَرِيقٍ فَقَالَ وَاللَّهِ لأُنَحِّيَنَّ هَذَا عَنِ الْمُسْلِمِينَ لاَ يُؤْذِيهِمْ ‏.‏ فَأُدْخِلَ الْجَنَّةَ ‏"‏ ‏.‏
Reference : Sahih Muslim 1914c
In-book reference : Book 45, Hadith 167
USC-MSA web (English) reference : Book 32, Hadith 6340
  (deprecated numbering scheme)