Aldis Hodge and Jurnee Smollett-Bell in WGN America's "Underground." (Skip Bolen/Sony Pictures Television)

“Underground,” WGN America’s new drama about the Underground Railroad, is set in 1857, but the action starts with a Kanye West song.

The show, which premiered Wednesday and airs weekly at 10 p.m., follows a group of slaves who embark on a daring escape from a Georgia plantation. In the opening scene, an enslaved blacksmith named Noah (Aldis Hodge) runs through the woods to the sound of “Black Skinhead,” a frantic, bass-thumping track from West’s 2013 album “Yeezus.”

So follow me up ’cause this s--- ’bout to go (down)

I’m doing 500, I’m outta control (now)

But there’s nowhere to go and there’s no way to slow (down)

If I knew what I knew in the past

I would have been blacked out on your a--

The song is punctuated in parts by West’s breathing, a motif the show integrates as Noah tries to evade a trailing slave catcher, and later in the episode as a musical undercurrent to a suspenseful plantation scene.

Slavery has long been explored in film and on television — a remake of the 1977 miniseries “Roots” is set to run on the History Channel in May — but “Underground” expands the story beyond the typical narrative, lifting it into thriller territory. And although the anachronistic music may seem jarring to some, it helps amp up the thrills while connecting “Underground” to the ongoing struggles for African Americans in the current cultural and political landscape.

The 10-episode series isn’t the first period piece to go this route. Quentin Tarantino’s 2012 slavery-era film “Django Unchained” made noticeable use of contemporary music, including “100 Black Coffins” by rapper Rick Ross. Baz Luhrmann’s 2013 take on “The Great Gatsbyjuxtaposed jazz with hip-hop. (Jay Z was an executive producer of the film and its soundtrack.)

“Underground” creators Misha Green and Joe Pokaski said that music has been an integral part of the new show since the “Heroes” alums conceived the idea at a breakfast meeting about three years ago. They wanted the series to be bold, both visually and narratively, and saw music as a way to bridge the past and present.

“We really wanted to push the bar using contemporary music and traditional music in the show to really give it a sound that was like nothing you’ve heard before,” Green said.

Renwick Scott, left, Jurnee Smollett-Bell and Aldis Hodge in "Underground." (Skip Bolen/Sony Pictures Television)

To that end, they hired Oscar- and Grammy-winning musician John Legend as an executive producer. Composer Laura Karpman and singer-songwriter Raphael Saadiq teamed up to do the score. Karpman’s career spans film, television, theater and video games. Saadiq is well-known for his work as a producer, and as a member of the R&B group Tony! Toni! Tone! and neo-soul outfit Lucy Pearl. The two Grammy winners collaborated on the score for the 2013 film “Black Nativity.”

The show’s contemporary music — including songs from the Weeknd and rock band X Ambassadors — was part of an effort “to make people feel the urgency of the situation and to take the show and the music off of the museum wall,” said Legend, who also penned the brooding “Who Did That to You” for “Django Unchained.” “You want people to feel really connected to the action of the show, and you want them to feel the energy.”

In addition to using typical classical music for the score, Saadiq and Karpman experimented with different sounds to evoke both the time period and the personalities of individual characters. They used an electronic keyboard known as a Mellotron, distorted guitars, hip-hop-style percussion and de-tuned instruments — including banjos and bass harmonicas — to give a modern effect to sounds from the period. They also created updates of traditional music, such as spirituals, including contemporary arrangements for a children’s choir.

“When it worked, it was magic,” Karpman said. “It’s not saying, ‘Oh, this is taking place in the 1850s.’ It’s saying these are human beings that do things, that feel things, that go places . . . It’s about relatability, and I think in doing certain things we would give a nod to the period, certainly, but we didn’t feel bound by it.”

Christopher Meloni in "Underground." (Steve Dietl/Sony Pictures Television)

The show’s soulful theme song, “Heaven’s Door,” also embodies that intersection of traditional and contemporary. Legend wrote the song with Angelique Cinelu and Curtis Richardson. It’s performed by D.C. native Alice Smith, whom Legend has known since the early days of his career.

“Heaven’s Door” draws inspiration from a traditional song called “Follow the Drinking Gourd,” which is said to have functioned as coded instructions for slaves seeking to escape to freedom through the Underground Railroad. That folklore factors heavily into “Underground’s” narrative as Noah organizes an escape plan for several of his fellow slaves.

“‘Heaven’s Door’ is our version of that — our map to freedom,” Green said. “It was important for us because it was so important to the Underground Railroad to integrate that kind of hope.”

Despite the show’s 19th-century setting, Legend said he sees a connection to ongoing discussions around present-day issues such as the Black Lives Matter movement and inequality in the criminal justice system.

“You can’t divorce what’s happening now in American race relations from the period of slavery because so much of the context for how the country thinks about race was established during slavery,” he said.

“I think the power of this show is showing that brave people who are willing to do some really risky things are able to make change happen,” he added. “These folks traveled hundreds of miles under threat of death or being recaptured and death to their families and they chose to break free. I think that’s inspiring for anyone who is fighting for justice.”

Underground airs 10 p.m. Wednesday on WGN America.