Nahj al-Balagha Hadith n. 312

Selections from The Sayings and Preaching of Amir al-Muminin Ali ibn Abi Talib (Peace Be Upon Him) Including His Replies to Questions and Maxims Expressed for Various Purposes.
Translated by Sayyid Ali Reza

وَقَالَ (عليه ‏السلام):

Amir al-mu'minin, peace be upon him, said:

إِنَّ لِلْقُلُوبِ إقْبَالاً وَإِدْبَاراً

Sometimes the hearts move forward and sometimes they move backward.

فَإِذَا أَقْبَلَتْ فَاحْمِلُوهَا عَلَى النَّوَافِلِ،

When they move forward get them to perform the optionals (as well),

وَإذَا أَدْبَرَتْ فَاقْتَصِرُوا بِهَا عَلَى الْفَرَائِضِ.

but when they move backward keep them confined to obligatories only.