Thereupon the people said: Stop! Stop! There is no god but Allah. He is putting himself into danger.
Abu Ayyub said: This verse was revealed about us, the group of the Ansar (the Helpers). When Allah helped His Prophet (ﷺ) and gave Islam dominance, we said (i.e. thought): Come on! Let us stay in our property and improve it.
Thereupon Allah, the Exalted, revealed, "And spend of your substance in the cause of Allah, and make not your hands contribute to (your destruction)". To put oneself into danger means that we stay in our property and commit ourselves to its improvement, and abandon fighting (i.e. jihad).
Abu Imran said: Abu Ayyub continued to strive in the cause of Allah until he (died and) was buried in Constantinople.
In-book : Book 15, Hadith 36
English translation : Book 14, Hadith 2506