Sheikh `Abd al-Rahmân al-`Ajlân, lecturer at the Grand Mosque in Mecca
This is a matter of disagreement among scholars. It was related that the Prophet (peace be upon him) said: “If the middle of Sha`bân falls, do not fast” [Sunan al-Tirmidhî and others]. However, the majority of scholars classified the hadîth as weak and hence allowed fasting after the 15th of Sha`bân.
The permissibility of fasting at this time can also be inferred from the authentic hadîth: “Do not fast one day or two days before Ramadan except someone already intending to fast (for some other reason)” [Sahîh al-Bukhârî]
Therefore it is permissible to fast at any time in the month of Sha`bân. However, you should not fast the last two days of Sha`bân unless these days fall into your general program of fasting. For instance, if you fast on Mondays and Thursdays and the last day of Sha`bân is a Thursday, then you may fast on that day.
And Allah knows best.
Source: Islam Today