David Shepherd, who kick-started modern improvisational theater more than half a century ago when he co-founded the Compass Players in Chicago, a theatrical troupe that was credited with inspiring — if only inadvertently — comedic juggernauts such as Second City and “Saturday Night Live,” died Dec. 17 at a rehabilitation center in Holyoke, Mass. He was 94.

He had lung and other ailments, said his wife, Nancy Fletcher.

The son of a prosperous architect, related by family marriage to the railroad magnate Cornelius Vanderbilt II, Mr. Shepherd decamped from the moneyed environs of the East Coast and hitchhiked west in the early 1950s. He found in the Hyde Park neighborhood of Chicago, home to the University of Chicago, fertile ground for the type of theater he sought to grow.

His art form, the improvisational theater that traced its roots to centuries-old commedia dell’arte traditions, would be spontaneous and politically alive. It would be created in the moment onstage. And it would be of the moment in the wider word.

“New York theater was too effete . . . all about three-act plays, boring,” he told the online publication MassLive in 2014. Improv, he continued, was a “revelation.”

“You discovered stuff when you were improvising,” he continued. “You weren’t discovering the mind of George Bernard Shaw; you were discovering the mind of your group. That was exciting.”

With Paul Sills, a son of the noted drama teacher Viola Spolin, Mr. Shepherd formed Compass Players in 1955. The company — which he wished to point in the direction society was moving — was credited with popularizing the theatrical genre in which actors perform without scripts, creating dialogue as they go, sometimes with audience participation.

Notable deaths in 2018 and 2019: Nipsey Hussle, George H.W. Bush, Stan Lee, John McCain, Aretha Franklin and other famous faces we’ve lost

Nipsey Hussle, a Grammy nominated rapper who sought to revive South Los Angeles, died at age 33 on March 31. Read the obituary (Matt Winkelmeyer/Getty Images for Warner Music)

Along with its better-known and more comedic successor, the improvisational troupe Second City, Compass became the training ground of some of the most celebrated actors of Mr. Shepherd’s generation, among them Mike Nichols and Elaine May, Barbara Harris, Ed Asner, Shelley Berman, and Jerry Stiller.

“If it wasn’t for David’s work in improvisation, if it wasn’t for his contributions to American theater, I don’t think we would have had ‘Saturday Night Live’ or ‘Mad TV’ or Second City,” Michael Golding, an improv teacher who describes himself as a protege of Mr. Shepherd, observed in the 2010 documentary film “David Shepherd: A Lifetime of Improvisational Theatre.”

A recurring Compass sketch — perhaps a precursor to SNL’s Weekend Update — was one in which performers improvised politically provocative scenes taken from the newspaper. In another early Compass skit, a man sells his wife to a steelworker.

Mr. Shepherd “dreamed of putting on plays that would awaken the proletariat to the way it was manipulated and exploited by those who ran society,” Jeffrey Sweet, a historian of Compass, once wrote in the Chicago Tribune. “He hoped that these theatrically induced epiphanies would in turn stimulate the audience to action.”

But Compass, which also operated in cities including Boston, New York and St. Louis, proved short-lived, as performers sensed the potential of their funnier work. Mr. Shepherd turned down an opportunity to join Second City — a decision that he later confessed to regretting.

He said he saw little of his original vision in improv’s current form, which he regarded as often cheaply humorous and excessively vulgar.

“He had helped generate a revolution in theater, but it wasn’t the kind of theater that he wanted,” Sweet told the Tribune after Mr. Shepherd’s death. “He was like a Marxist who had a child who became head of General Motors. He couldn’t help but be happy for the child’s success even as he disapproved of what the success was in.”

“I usually feel like slitting my wrists when I go to improvisational cabarets these days,” Mr. Shepherd had told the Globe and Mail in 1985, “because it’s so far removed from what I envisioned when I put my thumb out towards Chicago.”

David Gwynne Shepherd was born in New York City on Oct. 10, 1924. He was raised by his father and a stepmother after his mother was hospitalized for schizophrenia.

Mr. Shepherd attended the private Phillips Exeter Academy in New Hampshire before enrolling at Harvard University, where he received a bachelor’s degree in English in 1948 following Army service during World War II. After receiving a master’s degree in the history of theater from Columbia University in 1951, he continued his studies at the Sorbonne in Paris and taught English in India.

He said that when he set out on his hitchhiking journey, he planned to stop in Cleveland but rode several hundred miles farther to Illinois on the request of the lonely truck driver who had given him a ride. His first project in Chicago, before Compass, was co-founding the Playwrights Theatre Club.

His marriages to Suzanne Stern and Connie Carr ended in divorce. He and Fletcher married in 2014 and resided in Belchertown, Mass. Besides his wife, survivors include a daughter from his first marriage, Kate Shepherd of New York City; and two grandchildren. A son from his first marriage, Evan Shepherd, died in 2011.

Mr. Shepherd remained an evangelist for improvisational theater and its societal benefit decades after Compass folded. Among the ventures he helped found were the Improv Olympics competition, an improv program for prisoners in the Bronx and an initiative to help Massachusetts youths build confidence through acting.

“People get locked inside personas that don’t change for decades,” he once remarked. “It’s important for them to get out.”