Watching Matthew Heineman’s new documentary Cartel Land is like visiting a meth lab in the desert on a dark night, being caught in the middle of a shootout between Mexican vigilantes and a drug cartel, and being a witness to torture.

Through parallel narratives the documentary follows the drug trade on both sides of the U.S./Mexico border and hones in on communities where lawlessness reigns and ordinary citizens have taken protecting themselves into their own hands.

Mr. Heineman risked his life to make Cartel Land, filming along southern Arizona’s hillsides and mountaintops and then spending nearly a year in Michoacan, Mexico, where one night he even slept in a backyard of the leader of a drug cartel.

Matt Heineman will speak on July 18 at the Martha's Vineyard Film Center. — Maria Thibodeau

“I told my subjects I wanted to be embedded within their groups to follow their stories over time and see how they developed,” Mr. Heineman said in a phone interview with the Gazette. “I didn’t just parachute in and out. I was there for a year and developed relationships, which allowed me to earn their trust.”

Mr. Heineman’s on-the-ground reporting style informs the tone of the movie. At one point he was caught in the middle of a shootout between the Autodefensas of Michoacán and the Knights Templar drug cartel.

He said that concentrating on the craft of filmmaking in moments of extreme danger allowed him to remain calm even when bullets were flying around him.

At the 2015 Sundance Film Festival, Cartel Land won the special jury award for cinematography in the U.S. documentary competition and Mr. Heineman won the best director award. The movie will be shown at the Martha’s Vineyard Film Center beginning July 17. Mr. Heineman is a summer resident of the Vineyard who has been coming to the Island since he was two years old. He will attend the screening on Saturday, July 18, to discuss the film.

Cartel Land’s domestic storyline follows Tim (Nailer) Foley, a military veteran and out of work construction worker who has taken to policing the Arizona/Mexico border.

“There’s an imaginary line out there between right and wrong, good and evil,” he says. “I believe what I am doing is good, and I believe what I am standing up against is evil.”

Similarly, 1,030 miles away from the Arizona border, in Michoacan, Mexico, Dr. Jose Mireles leads the fight against the Knights Templar drug cartel. The two men share a common enemy, but they never meet during the course of the film.

Both storylines began as pieces of journalism. Damon Tabor’s Border of Madness for Rolling Stone originally inspired Mr. Heineman to make Cartel Land.

“I was fascinated by what happens when government fails and citizens feel like they are forced to take the law into their own hands and then what the consequences of that are,” said Mr. Heineman.

Four or five months into shooting, a second article in the Wall Street Journal changed the course of the film, leading Mr. Heineman to study retaliation on both sides of the border.

“I thought I was telling a very simple hero/villain story in the classic western sense, and over time the lines between good and evil became more and more blurry,” he said. “I became obsessed with trying to understand what was really happening, who these guys really were, and I pushed to get those answers.”

Mr. Heineman hopes that his film will inspire conversations and eventually produce concrete action to help stop the drug wars that affect both the U.S. and Mexico.

“People are obsessed with ISIS and other conflicts around the world, but there is a war within our neighboring country and we are consuming drugs that are fueling that war,” he said. “Roughly 80,000 people have been killed since 2007 as a result of the war, and 20,000 people have disappeared.”

Mr. Heineman gives audiences an undeniably emotional entrée into a world that is often portrayed through a skewed lens in popular culture. It reveals the impact of drug cartels on the Mexican people as well as Mexico’s rampant corruption. The timing of the movie’s release has also been fortuitous considering the recent prison escape of Mexican drug kingpin Joaquon Guzman Loera, known as El Chapo.

When asked to reflect on his experience making this documentary, and on filmmaking in general, Mr. Heineman said, “If you end up with the story you started with then you weren’t listening along the way. It’s good advice for life itself and for filmmaking it’s something I try to carry with me every day.”

For a full list of screenings, visit mvfilmsociety.com.