He was an abid (devout worshipper) and zahid (ascetic) personality. He spent 300,000 dirhams for the sake of acquiring ilm (knowledge). For forty years, he did not lie down on a bed.
According to what the Hafiz Abu Nu'aym narrated, one night a woman came to Ahmed b. Mehdi and said: "A calamity has befallen me. I was forced into zina (fornication), they committed zina with me, and as a result of zina I became pregnant. But I told people that the child in my womb was from you and that you were my husband. I informed them that I was pregnant by you. Now
Cover my shame so that Allah may also cover your faults. Do not disgrace me publicly."
Let us hear the rest of the event from Ahmed b. Mehdi himself:
"Upon the woman saying this, I did not raise my voice, I remained silent, I said nothing to the slanderers. After a while, when the woman gave birth, the neighbors and the imam of the neighborhood mosque came and congratulated me because my son was born. I showed them that I was happy. Since they brought good news, I bought sweets for two dinars and fed those who came to congratulate me. Also, every month I sent two dinars to the woman through the neighborhood imam for her and the child’s expenses, and I used to say: 'Send my greetings to the woman. However, due to an incident that caused our separation, we now live apart.' This situation continued like this for two years. Then the child died. The neighbors came and offered condolences. I acted as if I was saddened. After a while, the child's mother brought back to me the alimony money I had previously sent her. She had collected the money in a pouch. She said to me: 'May Allah cover your faults and reward you with good. Here are the dinars you sent me.' I replied to the woman: 'I was sending that money to help the child. Now he is dead, but you are mourning him. The money is yours. Spend it as you wish.' Although I said this, the woman left the money and went away."

