A scene from '12 O'Clock Boys,' directed by Lotfy Nathan. Noah Rabinowitz

Seven years ago, as a painting student at the Maryland Institute College of Art in Baltimore, Lotfy Nathan became fascinated by a mysterious gang called the 12 O'Clock Boys.

They were hard to see in action, he said, "but you could hear them a lot."

The rumble of dirt bikes commanding the streets of Baltimore in ritual parades of stunt riding inspired a kind of urban legend. "People thought they were drug dealers, but that didn't make any sense," said Mr. Nathan, who is 27 years old and lives in Williamsburg. "That's the loudest possible way to deliver drugs."

Lotfy Nathan Natalie Keyssar for The Wall Street Journal

When he finally introduced himself to a crew of the mostly young African-American bikers, and began shooting video of their exploits, Mr. Nathan had no goal beyond making a short art piece. As he got deeper into the scene, however, the project gathered momentum and turned into "12 O'Clock Boys." The film, which opened Friday, captures the rebellious spirit of the bikers, so nicknamed because they tilt the front wheels of their vehicles nearly straight up, like the hands of a clock striking high noon.

While celebrating the visceral excitement of an outlaw sport with crafty photography, the film also observes its dangers to public safety. Police engage the riders in games of cat-and-mouse and attempt to make arrests. Some of the bikers suffer injury or death in accidents, not unlike participants in other extreme sports.

Mr. Nathan, a first-time filmmaker, had a breakthrough in 2010 when he met "Pug," a 12-year-old whose adolescent perceptions shape the story, turning it into a coming-of-age saga. It's not an easy life for a child, but the 12 O'Clock Boys give Pug an ambition.

"You see him becoming a man," Mr. Nathan said. "That age range, from just before puberty, is so significant in Baltimore. You see kids shed their vulnerability and develop a really hard shell. They put it on really fast. They start wearing it before they know what it is."

The senior biker on the scene, a man who only gives his name as Steven, assisted Mr. Nathan throughout the production. "Dirt-biking saved my life," he said during a phone interview. "It gave me something to shoot for."

Now 37, Steven said the bike crews had been riding since the early 1980s but had become more public in recent years. "It was just a thing to do in Baltimore and it grew into this thing we have today. The movie is going to put the true story out there."

Much like the bikers, Mr. Nathan also ran afoul of law enforcement. Early in his efforts, he was charged with filming an illegal activity. "We had to remind them that what we were doing was not illegal," said Eric Blair, who hired Mr. Nathan at his production company in 2009 and became a producer of "12 O'Clock Boys."

Mr. Blair, who had worked on "The Wire" creator David Simon's Baltimore-set shows "Homicide: Life on the Street" and "The Corner," saw the film in a larger cultural context as "another chapter in Baltimore's vibrant history and complex future."

The film's greatest obstacle wasn't dealing with the police or bonding with the bikers—"they were really into talking," Mr. Nathan said—but nailing the majestic slow-motion images of the bikes as they roll in procession. The shots were key because they symbolize the dreamlike quality that being a 12 O'Clock Boy holds for Pug.

"We barely got it," said Mr. Blair, who employed a specially rigged, high-resolution device called a Phantom Camera to capture footage. After much failure and frustration, the crew turned over the truck keys to Steven, who maneuvered the vehicle through the pack of riders to get the film's most spectacular shots.

"If some of the riders had had their way," Mr. Nathan said, smiling, "the film would have been a two-hour wheelie."