Imran Bin Husain relates the Holy Prophet (peace be upon him) having said to him or to someone else: ‘Did you fast in the middle of Sha’ban?’ He said: ‘No.’ Thereupon he (the Noble Prophet Muhammad, peace be upon him) said: ‘If you did not observe fast, then you should observe fast for two days. (Sahih Muslim)

The Noble Prophet Muhammad (peace be upon him) used to make preparations for the forthcoming month of Ramadan in the month of Sha’ban. He used to increase his prayers and observe fast for many days, particularly on three days, i.e. 13th, 14th, and 15th of, Sha’ban. He also used to exhort his companions to observe three fasts in this month and make preparations for the coming month. Sha’ban is in fact the precursor to Ramadan in order to attune oneself to the rigor of fasting. It is a period of training for Ramadan.

This Hadith has been interpreted differently by different scholars. One interpretation is that the man in question was accustomed to observe fast at the end of Sha’ban but he did not observe it as it was forbidden to do so.

The Noble Prophet (peace be upon him) asked him and he replied that he did not observe the fast at the end of Sha’ban. Then the Noble Prophet (peace be upon him) told him that this prohibition did not apply to those who were accustomed to fasting during those days. He was therefore asked to observe two fasts instead of one so that he might not be deprived of the good act he was doing or become slack in this good habit of devotion to Allah.

The second explanation is that the man did not observe a voluntary fast in the middle of Sha’ban which has a great reward in store for believers. On learning from the man that he has shown slackness in this, the Noble Prophet (peace be upon him) exhorted him to observe two fasts in the month of Sha’ban.

The Noble Prophet (peace be upon him) has however forbidden the believers from fasting on one or two days just before the month of Ramadan except in the case of a person who is accustomed to fasting. Fasting is also not allowed when the second half of Sha’ban starts.