Hazrat Harthamah (rahimahullah) once came to Imaam Shaafi‘ee (rahimahullah) and conveyed to him the salaam of the ruler, Haroon Rasheed. Harthamah also mentioned, “The ruler has instructed that five thousand dinars (gold coins) be given to you.” Accordingly, the wealth was later brought and given to Imaam Shaafi‘ee (rahimahullah). Imaam Shaafi‘ee (rahimahullah) then called a barber to cut his hair. After his hair was cut, he gave the barber fifty dinars. Imaam Shaafi‘ee (rahimahullah) thereafter took pieces of cloth, tied them into small purses and filled them with the dinars after which he distributed them among the people of the Quraish (the tribe of Rasulullah (sallallahu ‘alaihi wasallam)) who were present, as well as those who were in Makkah Mukarramah. Finally, when Imaam Shaafi‘ee (rahimahullah) returned home, less than one hundred dinars remained (on account of his generosity, Imaam Shaafi‘ee (rahimahullah) had given most of the wealth away).
Hazrat Humaidi (rahimahullah) narrates that when Imaam Shaafi‘ee (rahimahullah) arrived in San‘aa, a tent was erected for him. On his arrival, Imaam Shaafi‘ee (rahimahullah) had ten thousand dinars (gold coins) with him. Thereafter, some people came to Imaam Shaafi‘ee (rahimahullah) and asked him for assistance. Eventually, when it was time for Imaam Shaafi‘ee to depart and the tent was packed, Imaam Shaafi‘ee (rahimahullah) had no money left (as he had given all his wealth in charity to those asking him for assistance).
(Siyar A’laam min Nubalaa vol. 8 pg. 391)