The 24-year-old Canadian musician memorializes friends lost to violence on his debut EP, “When Smoke Rises.”LOS ANGELES — In the middle of Mustafa’s potent, chilling and heart-rending debut EP, “When Smoke Rises,” is “The Hearse,” a startling two-minute meditation on revenge in the wake of a friend’s murder.“I was all about the peace/I didn’t wanna risk it all/Oh, I know what’s at stake,” he sings, trying to maintain equanimity in the face of trauma. But his mood, and the song — a soft folk number with fingerpicked acoustic guitar and an almost unconscious, corporeal rhythm — takes a somber, unexpected turn: “But you made yourself special/I wanna throw my life away/For you.”Mustafa, 24, sings these lines with an almost ethereal sigh, like you would serenade a lover, not the enemy in your cross hairs. And yet it is, somehow, a love song. And also an elegy. An indictment of the self. An indictment of the state. A bitter promise.When Mustafa began writing songs a few years ago, there were no other topics but the heaviness of his experiences. “I couldn’t write anything else,” he said earlier this month, in a sparsely decorated Airbnb on the east side of Los Angeles. “It was everything I was dealing with. It engulfed me.”More than 2,000 miles away from where he grew up in Regent Park, Canada’s oldest housing project and one of the roughest neighborhoods of Toronto, he was relaxed, wearing a black sweatsuit and a kufi, and speaking with a sober, sometimes sorrowful peace that comes from years of weathering storms.“When Smoke Rises” is a suite of folk songs about life — and death — in his hometown; the title refers to the rapper Smoke Dawg, a close friend who was killed in 2018. The EP is bracing and beautiful, hopeful and desperate, a solemn prayer for lives that never reached their potential, and a determined act to render their stories with beauty and care.For just this reason, Mustafa wasn’t sure if he was going to include “The Hearse” on the EP — whether it was fair to center his own hurt and preoccupation with those he perceived as enemies. “I thought about some opps more than I thought about friends, I was so obsessed with them,” he said. “This project is about the grace of the friends that I lost, you know? And I’m like, does that take away from that grace?”But ultimately, he concluded, he couldn’t fairly tell the story of his upbringing, and how it has both shaped and undone him, without it. “My grief,” he said, “is incomplete without the rage.”“When Smoke Rises” is full of such cruel, pained calculations: how to memorialize the dead, how to express love in hopeless circumstances, how to protect those you care about when no one else will, or can. “Don’t crease your Air Forces/Just stay inside tonight,” he gently pleads on the weeping sigh “Air Forces.” On the directly anxious “What About Heaven,” he sings as if calling after someone he fears he might never see again: “We forgot to talk about heaven.”The turbulence he sings about is still very much ongoing. Sometimes, Mustafa said, after writing a song, he’d wonder, “Did I just crystallize a feeling that I haven’t even survived?”Mustafa — born Mustafa Ahmed — has been grappling with the weight of injustice since his older sister first encouraged him to form his thoughts into poems in the mid-2000s. His family emigrated to Canada from Sudan around 1995. By age 12, he was getting local media attention for his verse about the challenges facing his community; in 2016, he was appointed to the Prime Minister’s Youth Council.None of that changed the cycle of devastation in Regent Park, though, and Mustafa has become something of a community ethicist and mentor, a guide for families dealing with the death of their loved ones, and an outspoken advocate for the Muslim community. He is also something of a guardian: His younger brother Yassir and a young Toronto rapper named Lil Berete were staying in the Airbnb with him. At one point during the conversation, Berete’s mother called on FaceTime, and Mustafa assured her that her son was praying every day, going to the mosque and not smoking.“I’m just using the avenue of music to do the very thing that I’ve always done,” Mustafa said.Bethany Mollenkof for The New York Times“It doesn’t matter how anti-establishment, anti-imperialist I am, change won’t be in my lifetime,” Mustafa said. “So all that I can do is within me. I try to keep people alive. And I try to make sure that we’re protected.”As a young person, while many of his peers were finding themselves in hip-hop, Mustafa gravitated to folk music and earthy singer-songwriters: Nick Drake, Richie Havens, Joni Mitchell, Leonard Cohen. “I remember being younger and people were mad, like, ‘This guy’s always emotional,’” he said with a laugh. “But the truth is, I was just exploring a sentimental language, you know what I mean?”During the making of “When Smoke Rises,” Mustafa was taken by how Sufjan Stevens memorialized his mother on the 2015 album “Carrie & Lowell.” Mustafa pulled out his phone to read a letter he sent to Stevens via an intermediary, part mash note, part confessional. “I dreamed to bridge the worlds of grief and glory,” he wrote, confiding in Stevens about the ghosts hovering over his music. “The deaths were complicated and violent and unfair, but still they are my own. And the way I reflect them can be all that and still beautiful, as you have so brilliantly displayed. Nothing in vain.” (He hasn’t yet heard back.)Tensions in Regent Park are ongoing; Los Angeles has become a safe retreat for Mustafa, a place where he can explore his creativity. When he was first exploring the studio, as he was struggling to find the proper voice and tone for his stories, he fell into songwriting for others, collaborating on tracks by the Weeknd and Camila Cabello, as well as the Shawn Mendes-Justin Bieber hit “Monster.” But writing about anyone but himself was, in fact, a distraction.“I wasn’t being daring at all,” he said. “I just couldn’t bear the thought of seeing anything, explaining anything in its full truth.”Eventually, in 2019, he went to London to work with the producer Simon Hessman on demos he’d been chipping away at for a couple of years. Later, they were joined by Mustafa’s friend Frank Dukes, who has produced for Post Malone, Rihanna and the Weeknd. Dukes had been probing Smithsonian Folkways anthologies of Sudanese and Egyptian music, some samples of which ended up on “When Smoke Rises,” bridging Mustafa’s modern-day tales to the past. Mustafa also includes vocal samples of friends who have died, and of his mother, his way of inscribing them into history.Mustafa’s earliest versions of these songs tilted toward pure folk. “I think we always struggled with what the rhythmic architecture of the music was, because it was so guitar-driven,” said Dukes over dinner at an Italian restaurant in Los Feliz the following evening. Working with North African samples helped create an unobtrusive backdrop that deepened Mustafa’s storytelling. “Sometimes it takes a while to arrive at that simplicity,” Dukes said. (James Blake and Jamie xx also contributed production.)Before he started writing music for himself, “I wasn’t being daring at all,” Mustafa said. “I just couldn’t bear the thought of seeing anything, explaining anything in its full truth.”Bethany Mollenkof for The New York TimesThe mood at dinner was lighthearted, with clouds in the distance. Mustafa had spent some time earlier that day in a public back and forth on Instagram with an executive at Warner Records, a minor social media conflagration — “a microcosm of what happens when you’re in full support of Palestinian lives,” he posted — spurred by the recent violence in Gaza.“I’m just using the avenue of music to do the very thing that I’ve always done,” he said, underscoring the complete overlap of his personal and creative lives. He’d just returned to the table after stepping away to find a quiet spot for prayer. “For a lot of people, they’re like, ‘Oh, it’s a seamless transition. He’s saying exactly what he’s always been saying. And he’s standing alongside of the same people he’s been standing alongside. All that he’s doing is stretching those words through melody.’”But being the bard of a horrific stretch of time, and a creative conscience for a community in pain, hasn’t come without a tax.“I don’t want to write these songs. I don’t like these songs,” he said later that night, in a car headed to meet up with some of his Palestinian friends. “I resent everything about them and how they’ve come to be and everything that surrounds them. I hate that I had to make them.” The music remains a live wire, not a safe haven: “Just because it’s my responsibility doesn’t mean that it’s serving me.”At this point, he’s not even sure if he’ll ever perform them in concert. But he’s relieved to have put them into the world, if only so he might move on: “I just want young kids to come up and be like, ‘Oh, that’s what grief looks like.’ It wasn’t tucked away. It wasn’t buried.” More