During a trip to the Vineyard last summer, playwright Allison Snyder stumbled upon the Tisbury Amphitheater. The outdoor space seemed perfect for a play she had written based on a Mark Twain short story that takes place outdoors.

She called MJ Bruder Munafo, Martha’s Vineyard Playhouse’s artistic and executive director, that day.

“We get pitches all the time, and there’s no way on earth that we could do all of them,” Ms. Bruder Munafo recalled recently. “But there was something about Allison. The theatre for me is about the people, and I liked her very much. I also liked her script, and it did seem like a great fit for the amphitheatre. So the decision, for me, was about intuition.”

This weekend, Ms. Snyder’s play The Campaign that Failed: A Theatrical Reimagining of Mark Twain’s Short Story premieres at the Tisbury Amphitheater. Performances are June 23 and 24, beginning at 6 p.m.

The play is a retelling of Mark Twain’s satirical short story, The Private History of a Campaign that Failed, which he wrote about his two-week stint in the Confederate guard during the Civil War.

Ms. Snyder said she began writing the play in 2016 when she read Mr. Twain’s story in a class at Sarah Lawrence College. It was also the start of Donald Trump’s time as President, and Ms. Snyder said she felt the threat of a civil war for the first time.

Despite the serious nature of its inception, Ms. Snyder said the play is humorous in the spirit of Twain’s story, and inspired by the players in Shakespeare’s A Midsummer Night’s Dream. She said her characters are “as much a theatre troupe as an army barracks.” Dropped in the middle of a conflict, the men make sense of their role in uncharted territory.

“In a lot of ways, both the story and the play are kind of like farcical anti-war movies,” Ms. Snyder said. “With continued violence in the world and in our country, the story felt necessary to both conjure up the past but also sort of imagine what it would be like if violence erupted in that way in the present.”

The play is directed by Michael Herwitz, a friend of Ms. Snyder’s since high school. The pair has collaborated on three projects.

“I think the gift of Allison’s writing is that she’s able to hit you when you least expect it, but also make you delight in her imagination,” Mr. Herwitz said. “This play is zany and it’s bananas. But it’s also nostalgic and beautifully tender. This play is really about childhood, and loss of childhood.”

A note in the script reads that the year could be 1861 or 2061. Mr. Herwitz explained that placing the narrative faithfully in Mr. Twain’s 1861 risked the audience writing the characters off as unrelatable.

Mr. Herwitz added that the play’s minimal set and props bring it back to the basics of theatre and that a child-like sense of wonder runs through the show. He believes the story speaks to a wide range of audience members.

“I think that this play is for anybody who is trying to decide what they care about and why and how they are going to live their values,” he said. “I’m hoping people can throw out the real world for a second and join us in the woods. I want them to live in the absurdity.”