Zamperini's death was confirmed by Universal Pictures studio spokesman Michael Moses. A family statement released early Thursday said Zamperini had been suffering from pneumonia.
He is the subject of Laura Hillenbrand's best-selling book "Unbroken: A World War II Story of Survival, Resilience, and Redemption," which is being made into a movie directed by Angelina Jolie and is scheduled for a December release by Universal.
"After a 40-day long battle for his life, he peacefully passed away in the presence of his entire family, leaving behind a legacy that has touched so many lives," the family statement said. "His indomitable courage and fighting spirit were never more apparent than in these last days."
Jolie said the loss was "impossible to describe."
"We are all so grateful for how enriched our lives are for having known him," she said in a statement. "We will miss him terribly."
A high school and University of Southern California track star, Zamperini - known as the "Torrance Tornado" - competed in the 5,000-meter run at the 1936 Berlin Olympics. He finished eighth but caught attention by running the final lap in 56 seconds.
In World War II, he was a bombardier on a U.S. Army Air Forces bomber that crashed in the Pacific Ocean during a reconnaissance mission. He and one of the other surviving crew members drifted for 47 days on a raft in shark-infested waters before being captured by Japanese forces. He spent more than two years as a prisoner of war, surviving torture.
Zamperini became a born-again Christian in 1949 after attending a Los Angeles crusade led by evangelist Billy Graham. He eventually traveled as an inspirational speaker preaching the power of forgiveness.
At age 81, Zamperini - a five-time Olympic torch-bearer - ran a leg in the torch relay for the 1988 Winter Olympics in Nagano. During his visit, he attempted to meet with his most brutal wartime tormentor, Mutsuhiro Watanabe. But Watanabe, who escaped prosecution as a war criminal, refused to see him.
In speeches all over the world, Zamperini never failed to mention his alma mater, said former USC track and field coach Ron Alice.
"He was the greatest ambassador the university ever had. At every appearance, at every speech, he always wore his USC hat," Alice said. "He was the most gracious, humble, inspiring person you'd ever hope to meet. Just very, very special. And that's why there's going to be a movie of his life."
In May, Zamperini was named grand marshal of the 2015 Rose Parade in Pasadena, California, which next New Year's Day will feature the theme "Inspiring Stories."
In accepting the honor, Zamperini - wearing the ever-present USC cap - recalled that Hillenbrand, while researching the book, asked to interview his friends from college and the Army.
"And now after the book was finished all of my college buddies are dead, all of my war buddies are dead. It's sad to realize that you've lost all your friends," he said. "But I think I made up for it. I made a new friend - Angelina Jolie. And the gal really loves me, she hugs me and kisses me, so I can't complain."
He was a guest of Jolie last year when she was presented with the Jean Hersholt Humanitarian Award by the Academy of Motion Picture Arts and Sciences.
Hillenbrand called him "the grandest, most buoyant, most generous soul I ever knew."
"In a life of almost unimaginable drama, he experienced supreme triumphs, but also brutal hardship, incomprehensible suffering, and the cruelty of his fellow man," she said in a statement. "But Louie greeted every challenge of his long journey with singular resilience, determination and ingenuity, with a ferocious will to survive and prevail, and with hope that knew no master."
Zamperini was born Jan. 26, 1917, in the western New York city of Olean. A group in Olean is raising funds to place a granite marker in Zamperini's honor in War Veterans Park in August.
He was just two years old when his parents moved the family to Torrance in Southern California, where he lived for the rest of his life. Zamperini Field, a city-owned public airport in Torrance, is named in his honor. A stadium at Torrance High School and the entrance plaza at USC's track and field stadium both bear his name.
His wife, Cynthia Applewhite, whom he married in 1946, died in 2001. His survivors include daughter Cynthia, son Luke and grandchildren.
Associated Press writers Rod Hicks in Philadelphia and Anthony McCartney in Los Angeles contributed to this report.