With a population of about 50,000, Elkhart sits in far north Indiana, not far from the Michigan border and only 20 miles from the University of Notre Dame in nearby South Bend. Photograph by José Mandojana

WHEN DAVID GUNDLACH RETURNED HOME several years ago, it was inconceivable to those who knew him as a boy that he would soon be a local legend, almost a myth. In fact, he'd largely been forgotten.

It was spring of 2007 when Gundlach bought a house in Elkhart, Ind., where he went to high school and his mother still lived. Shortly after, he called longtime area resident Robert Kloska to say he wanted to reconnect. "I had to call my dad and say, 'Refresh my memory: Who is David Gundlach?'" recalls Kloska, now 46. The answer, recalled his father, was a boy who sometimes joined them during rounds of golf at the local country club. Gundlach was a good player—he was known to hit balls on the practice range until his hands bled—but a loner and somewhat socially awkward.

The Kloskas agreed to go for a ride on Gundlach's pontoon boat and see what sort of man he had become. In his early 50s at the time, Gundlach spoke with a slight English accent and his hair was more salt than pepper but he was in many ways the same guy Kloska remembered from childhood: gregarious, with a hearty laugh, but also prone to pontificating and needling people to the point it became uncomfortable. "He was just sort of an eccentric guy."

Gundlach explained that he'd been living and working overseas for more than a decade, and though he never married and had no children, he talked of his houses in Beverly Hills, Malibu and Las Vegas. He mentioned poker games in Hollywood with A-list celebrities, and hopes of getting into the movie business. Kloska's initial reaction: "I thought he had to be making some of this stuff up."

THE HEARTBREAK KID | David Gundlach Courtesy of the Estate of David Gundlach

Shown holding a dog next to an unidentified boy. Courtesy of the Estate of David Gundlach

Sledding with an unidentified girl. Courtesy of the Estate of David Gundlach

His mother holds two photos of him. Photograph by José Mandojana

He wasn't. A semi-regular visitor to Elkhart for the next few years, Gundlach eventually caught the town's attention when he co-produced a film called "Get Low," starring Bill Murray, Sissy Spacek and Robert Duvall. In the movie, which had a modest $7 million budget, Duvall plays a hermit who is the subject of rumors and mystery in the Tennessee town near where he lives and throws himself an elaborate funeral so he can "get low" and die in peace. The film got mostly positive reviews, but to Gundlach the real prize came at home. He told Kloska that a front-page story in the local newspaper, the Elkhart Truth, about his role in the project was one of the highlights of his life.

Residents were still getting to know their quirky neighbor when a year later, in 2011, Gundlach died of a heart attack at age 56. In Elkhart, the funeral drew an intimate crowd of about 50 people, including only a handful of people from out of town and overseas. "There weren't a lot of people anywhere who knew David," says Liz Naquin Borger, who grew up with Gundlach and was named executor of his estate.

In the weeks after his death, word trickled out around town that Gundlach had met with officials at the Elkhart County Community Foundation shortly before he died. There were rumors of a sizable gift, but few people knew how much money was at stake. His mother, Marge Swift, told friends that she didn't have any idea how much money her son had. The irony was inescapable: As in Gundlach's movie, a town was transfixed by a man who few knew anything about. And this story, too, had a happy ending.

When the estate was mostly settled, in mid-2012, Pete McCown, president of the foundation, went to visit Marge, who was 93 at the time. McCown told her that her son's gift was going to have a "transformative" effect on life in the community.

"How much was it?" she asked.

"Well," McCown recalls saying, "there is a Swiss bank account with $113 million sitting in it."

THE UNITED STATES IS IN the midst of what's being called the largest transfer of wealth in history, with trillions of dollars being passed down to future generations, says the Center on Wealth and Philanthropy at Boston College. While most of that money will go to heirs, a big chunk—about 12 percent—will be allocated to charities like hospitals and universities, which then have to make sure they make the best use of it. It's often a tricky business, and the Gundlach bequest generated more than its share of hand-wringing and debate.

While the size of the gift is significant, there's an extraordinary element:the foundation can use it however it likes.

With a population of about 50,000, Elkhart sits in far north Indiana, not far from the Michigan border and only 20 miles from the University of Notre Dame in nearby South Bend. A manufacturing hub for recreational vehicles, Elkhart has produced a steady stream of blue-collar millionaires over the years. But until Gundlach died, McCown didn't have an original Salvador Dalí sculpture on his desk, and there was no Marc Chagall painting above the filing cabinet in the office next door. Those works are among the noncash components of the estate, along with 11 homes and 15 cars, including a Rolls Royce, two Bentleys and a Ferrari. All in, the estate's value is estimated at $150 million, almost quadrupling the assets for the Elkhart County Community Foundation. Despite the pockets of wealth, Elkhart was hit hard by the recession. When President Obama visited in 2009, the city's unemployment rate was the highest in the country, at more than 15 percent. McCown says it's hard to overstate the impact the gift could have, calling it "one of the historic moments in time for this county."

A NEW HOME IN HOLLYWOOD | Gundlach funded 'Get Low,' starring Bill Murray, Sissy Spacek and Robert Duvall. Stephen Lovekin/Getty Images

His local newspaper featured him on the front page. Sony Pictures Classics/Photofest

While the size of the gift is significant, there's another element that potentially makes it extraordinary: The foundation can use it however it likes. Typically, big donors prefer to specify how their donations are used. But Gundlach declined to put conditions on his money. McCown, a 44-year-old former college professor, had just taken the job at the foundation when he met with Gundlach, who explained that he was putting the foundation in his will. After chatting for about an hour, McCown recalls, Gundlach tapped him on the knee and said, "Kiddo, it seems to me you are better qualified to handle this money than I am."

Like all foundations, Elkhart's must spend at least 5 percent of its endowment each year—now at least $7.5 million annually, 10 times more than its previous commitment. After the gift was announced, McCown says he received around 500 emails daily from residents with ideas on where the money should go, including pleas to fix schools, transform the animal shelter and even improve outreach to the local Amish community. At local charities and community groups, long-shelved proposals got dusted off as civic leaders angled to get a piece of the pie. McCown started a "listening tour" of the community to hear what residents think should be done. The first gifts will be made next year.

There is another, equally vexing decision to be made: how to honor the man behind the town's newfound largesse? The foundation's board recently voted to endow a scholarship fund in Gundlach's name, and there have been discussions about creating a library or gallery to display some of his art and furniture and perhaps tell the story of the town's benefactor.

That story, however, is incomplete in places. Even those who were closest to him say that because Gundlach traveled so much, no one had a complete picture of his life. "We had to piece together what was out there," says Borger. They describe a brilliant but complicated figure who was still trying to sort through how he wanted to use his vast fortune, and create a positive final chapter in a life marked by sadness and disappointments. With his gift to Elkhart, they say, he did just that. He was, McCown says, "a somewhat lost soul who did something incredibly noble at the end of his life."

AMASSING MANSIONS | Later in life, Gundlach bought several lavish homes in (clockwise from top left) Malibu, Oak Grove, Nev., Elkhart and Reynolds Plantatation, Ga. Photograph by José Mandojana (Elkhart)

THE HEARTBREAK STARTED early for Gundlach. He was born in Downey, Calif., and his father, an insurance man, died when he was 8 years old. His mother later moved the family back to Elkhart to live with her parents. David's older brother, a California highway patrolman, was killed several years later in a motorcycle accident. His mother says she and David were always "great buddies," and friends say he doted on her when he got older. But Gundlach never collected friends or thrived socially, which in combination with his tendency to fixate on topics or interests led some to believe he had a mild form of Asperger's syndrome—though Gundlach recoiled at the notion when it was suggested to him as an adult. He returned west for college to the University of Southern California but dropped out before getting a bachelor's degree at Chapman University.

I Leave My Fortune To...

A Chinese restaurant? Some large and unusual bequests:

1. Roman Blum, U.S.

Worth about $40 million | Died: 2012

When the real-estate developer died childless and without a will, he left behind the largest unclaimed estate in New York state's history. Experts say that in most of these cases, the money ends up in the state coffers.

2. Wellington Burt, U.S.

Worth about $100 million | Died: 1919

The lumber baron and former Michigan state senator took his own sweet time with his bequest. He wanted his fortune handed out 21 years after the death of the last grandchild, who was born while he was still alive. The money was finally distributed to 12 heirs in 2011.

3. Golda Bechal, U.K.

Worth more than $15 million | Died: 2004

The property magnate left her fortune to a couple running her favorite Chinese restaurant. The unusual friendship, which began over a dish of Chinese pickled leeks and bean sprouts, extended to shared Christmases and other holidays.

4. Nina Wang, Hong Kong

Worth about $10.7 billion | Died: 2007

A long-drawn battle over Wang's will unfolded when it revealed she had left her money to her personal feng shui guru. The Hong Kong court later ruled the bequest to be a forgery by the geomancer, who recently appealed a prison sentence for fraud. The money has gone to charity.

He worked at several large companies but ultimately followed his father into the insurance business and in 1995 started his own car-insurance firm in the U.K. that used demographic data to assess driver risk. It was an idea ahead of its time, says Andrew Bowen, a computer programmer who was the first person Gundlach hired. "He was very intelligent and very direct," recalls Bowen. Gundlach also made some brilliant marketing decisions, naming his company Hastings Direct in large part so he could use the digits 1066—the year of the Battle of Hastings—in the company's telephone number. The firm's jingle also became ubiquitous on British television.

Gundlach was also a workaholic and "a difficult person to know on a social level," Bowen says. With the habits of a committed bachelor, Gundlach began each week buying a half-dozen new dress shirts—then throwing them away after wearing them so he wouldn't have to do laundry. The two men, who were neighbors, ate dinner together almost every night for 10 years.

As the company grew rapidly, Gundlach made clear that he saw success—and the money that came with it—as a means to an end. One was charity. Gundlach always said he wanted to give his money away, Bowen says, and talked frequently of getting involved with groups that helped children. The other was "access"—meaning a wider spectrum of business and social activities he felt would be open to him through wealth.

In 2006, Gundlach got his payday. He sold Hastings Direct to Insurance Australia Group for 140 million pounds, or about $260 million at the time. With his new fortune, Gundlach returned to the U.S. and bought a $20 million glass-and-stainless-steel Malibu mansion, originally built by fashion designer Perry Ellis, and a Beverly Hills home neighboring Microsoft co-founder Paul Allen. He even plunked down millions on a 20,000- square-foot home at Reynolds Plantation in Georgia, telling friends that it was less than an hour's drive from Augusta National, home of the Masters, and that he dreamed of meeting someone who might invite him to join the exclusive club.

Word quickly spread in hollywood that Gundlach was sitting on a pile of money and willing to spend it.

Gundlach, whose favorite movie was "Gladiator," which starred Russell Crowe, also tried to break into Hollywood. Dean Zanuck, scion of the storied producing family, was introduced to Gundlach in 2008, after trying to make "Get Low" for years. At first, he was skeptical that this newcomer could help. "He told me, 'Get me a signed contract from Robert Duvall and a signed contract from Bill Murray and I'll write you a check for $5.5 million.'" Once the stars signed on, Gundlach stayed true to his word: Zanuck woke one morning to find $5.5 million in his production account.

THE INNER CIRCLE | Gundlach's childhood friend, Robert Kloska Photographs by José Mandojana

His mother, at the Elcona Country Club Photographs by José Mandojana

The executor of his estate, Liz Naquin Borger Photographs by José Mandojana

Word quickly spread in Hollywood that Gundlach was sitting on a pile of money and willing to spend it. "Guys like David come around once in a lifetime," says Joey Rappa, a producer who met Gundlach soon after he arrived in L.A. "People come at you in droves." Stars like James Franco and Keanu Reeves came to barbecues at Gundlach's Malibu mansion. Gundlach told friends that he played poker with Leonardo DiCaprio and Tobey Maguire. Gundlach was also prized because he didn't demand to participate in the creative process: His only nonfinancial contribution to "Get Low" was insisting a swear word get cut out, Zanuck says.

There were signs, though, that Gundlach was slightly adrift through this time. Because of a persistent bad back, he was taking painkillers, and there were many days when he didn't leave the house. His friends say he battled depression. On one occasion, Kloska says, Gundlach became convinced while watching the financial news that he could be a successful day trader. It was a poor impulse: He lost $6 million in less than 24 hours, he told Kloska. Gundlach also made fitful attempts at philanthropy. He bought an apartment building in Las Vegas with plans to convert it to a sort of halfway house for teens leaving foster care, but the project never got off the ground. His lawyer in Elkhart, Mike Pianowski, says Gundlach felt taken advantage of by the charities that he tried to work with and "had some bad experiences trusting people."

Around this time, Gundlach started spending more time in Elkhart, and the Kloskas, who have five children, became a sort of second family. On several occasions Gundlach told Kloska that he wished he had a family of his own and complained that many people only used him for his money. Yet Gundlach insisted on picking up the check at fancy dinners and implored friends to vacation at his houses around the country. When the Kloskas agreed to visit the Georgia house, Gundlach bought two extra jet skis so the kids could be out on the lake together. Gundlach also flew Robert and his wife, Margy, out to Hollywood for the "Get Low" premiere.

Kloska knew his friend was struggling, but saw glimmers that Gundlach was recognizing the good his money could do. Just before he died, Gundlach agreed to host an event for Holy Cross College, where Kloska works. Gundlach was subdued on the day of the event, and it took some convincing to get him to come upstairs and mingle. As it happened, the brother of a former Holy Cross student had been killed in combat in Afghanistan days before, and the event started with a prayer for the soldier and his family. Out of the blue, Gundlach announced that he was endowing a permanent scholarship in the fallen soldier's name. Gundlach "just came alive," Kloska says. "At the end of the day, he really wanted to help people."

Like all foundations, Elkhart's must spend at least 5 percent of its endowment each year—now at least $7.5 million annually, 10 times more than its previous commitment. The first gifts will be made next year. Photographs by José Mandojana

There are conflicting views about Gundlach's plans for his estate. Some say he complained of heart problems and knew he needed to settle his affairs sooner rather than later. Others contend the gift to the foundation was more of a placeholder until he opted for a detailed philanthropic plan that he would be involved in personally.

But all of those who knew Gundlach say he would be thrilled at the excitement his gift has generated around Elkhart, and the expectation that its impact will be felt for generations to come.

The effects are already showing up in surprising ways. In June, a local businessman announced plans to bring a professional baseball team to Elkhart. In deciding on a name for the team, one of the factors he considered was Gundlach's sizable gift to the community. The name he chose: the Elkhart County Miracle.

Write to Brad Reagan at brad.reagan@wsj.com