Performing in a hotel conference room doesn’t exactly sound like a noteworthy gig for a rapper. Unless the hotel is in Iran, the song you’re delivering is “Uncle Sam Goddamn” and you set off an international ruckus as a result.

“I thought they were filming it just to put it on a DVD or something like that,” Brother Ali said, recounting a real-life fracas at a conference in Tehran that inspired one of the most riveting tracks on his most spiritual album to date.

“Fifteen minutes later, they pulled me aside and told me my performance was showing on national TV. And they kept showing it, too.”

“I was duped,” he glumly surmised.

That incident is one of many learning experiences from Brother Ali’s past five eventful years that became lyrical fodder for his sixth album, “All the Beauty in This Whole Life.”

As the title suggests, the record rises above the darkness in the modern world — and in Ali’s own conflict-prone career — with a brighter message of peace, love and understanding. There’s even a tinge of lighthearted humor in the song about the Iran dust-up, “Uncle Usi Taught Me,” named after Usama Canon, one of several spiritual mentors the Minneapolis rapper studied with during his long break between albums.

After a 15-year music career largely defined by his Muslim beliefs and sometimes radical politics, Ali was invited to speak, not rap, at the conference in Tehran in 2015. When he got there, though, organizers coaxed him into performing one of his most firebrand songs; he later realized the Iranian government wanted to use it as anti-American propaganda.

Afterward, he faced death threats from both Iran and America. He was just a hair shy of making Homeland Security’s no-fly list. “I couldn’t even fly to Chicago without being questioned and searched,” he claimed.

“All the Beauty” is loaded with similar songs about making mistakes, admitting your shortcomings and forgiving yourself and others, all in the name of making this world a better place. It looks inward to find ways of being more outwardly constructive. It’s part self-help record and part smile-on-your-brother.

Hanging out at his record label Rhymesayers’ offices in Uptown three weeks ago before heading out on tour — a warmup for his big hometown appearance Sunday at the Soundset festival — Ali embodied the happier, more even-keel rapper that’s heard on the record.

He laughed when asked about his favorite outdoor activity at the remote, summer-camp-like Islamic retreats he attended, including ones in Northern California and West Africa. “It ain’t archery,” cracked the 39-year-old rapper, who is legally blind. “I like riding horses, because they won’t run over anybody I can’t see.”

Ali even talked excitedly about kicking off his tour in Omaha a few nights later. Yeah, that Omaha.

“It’s more rewarding now than it’s ever been before,” he said of touring, likening it to Muslim practices he took up heavily in recent years that focus on serving strangers, especially poor or troubled people.

“When I first started touring, I saw everyone else as different. Even the poor kids I saw back then, I thought they were different than people I grew up with in north Minneapolis. Now, I really see those people as the same, and I’ve come to love them, respect them.”

Feeling like an outcast

Ali (born Jason Newman) opens the new album with “Pen to Paper,” a song that recounts his conversion to Islam. At age 13, he met Bronx hip-hop legend KRS-One at a Michigan State University lecture, who suggested the troubled teen read “The Autobiography of Malcolm X.” The book turned him onto Islam, and within a few years he was a practicing Muslim in north Minneapolis.

“The world was a horrible place for me until I met the black people who loved me,” said Ali, who always felt outcast by fellow whites as a kid because of his albinism. “And then those black people wound up being hated by a lot of people in America.”

One of the more provocative songs on the new album is the lightly jazzy but heavy-hitting “Dear Black Son,” inspired by his oldest of two children’s views on police shootings of African-Americans (“You are not defined by anybody else’s crimes / You don’t need to answer for what happens in their minds”). Another powerful track, “Before They Called You White,” questions the history behind “the invention of whiteness” in America.

More and more, Ali pointed out, racism and anti-Muslim sentiments are becoming separate issues since “white Westerners are flocking to Islam these days.”

“There are white people here in the Twin Cities — ones that I know you know — who I helped become Muslim, but they don’t make a public thing out of it,” he said.

“In the ’90s, we all changed our names and were very radical about how we did it. It was more of an identity thing for us. Now, there are a lot of people named John, Steve and Tanner or whatever who are Muslim. They’re not the ones they show on CNN, though.”

Ironically, Ali’s music was a lot more political in tone on his last album, 2012’s “Mourning in America,” about which he lamented, “It was during Obama, so a lot of my fan base wasn’t really into it at the time. Since the election, though, a lot of ’em are saying, ‘Oh, you were ahead of the curve.’ ”

Deeper into Islam

After touring for “Mourning” wound down, he went deeper into studying Islam. He even got an apartment in Oakland, Calif., with plans to attend Zaytuna College, the country’s first four-year Muslim college, co-founded by one of his chief spiritual guides, Zaid Shakira. Ali’s peers and elder mentors, however, convinced him he would better serve others and himself by keeping up his rap career.

Just by coincidence, Oakland is also where Ali’s longtime producer Anthony “Ant” Davis, co-founder of the Rhymesayers label’s flagship act, Atmosphere, had been living. “We had kind of lost touch, which was sad,” Ali recounted, “but we reconnected there beautifully.”

In Oakland, he and Ant worked with multi-instrumentalist G Koop — who plays on Migos’ “Bad and Boujee” and other mainstream hits — laying the tracks that make up the new album. Ali said he didn’t even have to coach his producer on the hopeful, buoyant direction he planned to take in the songs.

“That’s how Ant has always been: He knows what’s going on in my life,” he said. “I don’t have to tell him what I’m going to write about. He has the same relationship with Slug [of Atmosphere], too.”

A sign of just how closely tied the new tunes are to Ali’s spiritual quest during his hiatus, he wrote the self-loving first single, “Own Light (What Hearts Are For),” when he had taken a vow of silence during one of his retreats to a Sufi center.

“We would have long periods of don’t listen to anything, don’t read anything, don’t say anything,” he explained. “I had been struggling with that song, ended up writing in my head that day.”

“That’s how I used to write all my songs,” he added, “except it was while riding the bus in Minneapolis, not on a remote mountain in California.”

Too bad Metro Transit riders aren’t asked to take a vow of silence, too.