Alan Naiman, a Washington state social worker, died of cancer this year. All his life, the 63-year-old was known for his thriftiness, but those closest to him had no clue there was a reason to his frugality. They found out after his death -- when Naiman left a surprising $11 million estate to children's charities, The Associated Press reported.

Naiman's beneficiaries and best friends were shocked by the amount of money he had saved up. For two decades, he worked for the state Department of Social and Health Services making $67,234 a year. He also worked side gigs to earn extra cash. Sometimes, he worked three jobs at a time.

He repaired his old, battered shoes with duct tape. He bought clothes from the grocery story. He loved cars but drove beat up ones on solo road trips.

He would go to grocery stores and delis at closing time to get deals. His best friends said he would take them out to cheap fast food joints. He was thrilled when he was finally eligible for senior discounts.

Get Breaking News Delivered to Your Inbox Click here to view related media. click to expand

The whole time, Naiman was sitting on a fortune.

In this 2013 photo, Alan Naiman poses at Children's Administration (DSHS) Child Protective Services in Seattle. Susan E. Madsen via AP

Before working at the state Department of Social and Health Services, handling after-hours calls, Naiman was a banker. His friend from his banking days, Shashi Karan, said he inherited millions from his parents, and saved millions from his own jobs.

He saved $11 million by the time he died in January 2018, and all of that money was given to charities that help poor, sick, disabled and abandoned children, the AP reported.

Naiman was unmarried and childless. His friends said he rarely spent money on himself because he saw how unfair life could be for children. He was a compassionate man, and his friends said he was devoted to his brother who had a developmental disability. Friends believe his brother inspired Naiman.

"Growing up as a kid with an older, disabled brother kind of colored the way he looked at things," his close friend, Susan Madsen, said, according to the AP.

Pediatric Interim Care Center was given $2.5 million. The private organization in Washington state cares for babies born to mothers who abused drugs and helps the children wean off their dependence. They are using some of Naiman's donation to pay off a mortgage and buy a new vehicle to transport the 200 babies it accepts from hospitals each year.

Naiman's donation was the largest one they had ever received.

He also gave $900,000 to the Treehouse foster care organization. He told the organization he was a foster parent years ago and had brought kids in his care to the group's popular warehouse, where wards of the state can chose toys and necessities for free, the AP reported.

Naiman's money will be used to expand Treehouse's college and career counseling statewide.