Imam ‘Ali (a.s.) said:
مَوْتُ الاْنْسانِ بالذُّنُوبِ أَكْثَرُ مِنْ مَوتِهِ بِالأَجَلِ وَ حَياتُهُ بِالْبِرِّ أَكْثَرُ مِنْ حَيَاتِهِ بِالْعُمْرِ
Early death of men is more often due to sin than for natural reasons, and long life of individuals is more often due to their righteousness than for natural reasons.1
Undoubtedly, a lot of sins and bad habits have a direct impact on shortening life (as in the case of drinking, gambling, jealousy, envy and vindictiveness) . Many also shorten it through indirect means such as the resulting social disorders, lack of public security and occurrence of wars (as in the case of usury, injustice and oppression). On the other hand, righteousness could lead to a long life due to its deep effect on the peace of spirit and conscience.
Therefore, sin, besides its harmful spiritual effects, is also very effective in shortening man’s life, whereas righteousness prolongs life in addition to generating other benefits and spiritual rewards.