On the shady side of forty—the wrong side, meaning more than forty. As evening approaches the shadows lengthen, and as man advances towards the evening of life he approaches the shady side thereof. As the beauty of the day is gone when the sun declines, the word shady means inferior, bad, etc.; as, a shady character, one that will not bear the light; a shady transaction, etc.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894