Nomcebo Zikode, the South African singer of the pandemic hit “Jerusalema” that inspired a global dance challenge, wrote the chorus while battling her own depression.It starts with a clap, and then the feet tap along to the beat: four times on each side, followed by a quick jump. As the melody rises, dancers dip low and twirl.It’s a dance easy enough for anyone to learn, and people all around the world have done so, with everyone from an urban dance crew in Angola to Franciscan nuns in Europe showing off their moves on social media.The “Jerusalema” dance, named for the South African hit song that inspired it, provided a moment of global joy during the lockdowns of the pandemic, a welcome distraction from the isolation and collective grief.But it was the chorus, a lamentation over a heavy bass beat, that was balm to millions. Sung in a low alto in isiZulu, one of the official languages of South Africa, audiences didn’t need to understand the song to be moved by it.The singer Nomcebo Nkwanyana, who goes by Nomcebo Zikode professionally, drew on her own intense pain when she wrote it.“Jerusalem is my home,” she sang. “Guard me. Walk with me. Do not leave me here.”After more than decade as an overlooked backing vocalist, and with her faith in music faltering, Ms. Zikode, 37, was in a dark place in 2019 when she wrote those words.Her manager, who is also her husband, insisted she write the lyrics to help her crowd out the voices in her head that were telling her to give up on music, and herself.Ms. Zikode, 37, was in a dark place when she wrote lyrics that would uplift millions.Alexia Webster for The New York Times“As if there’s a voice that says you must kill yourself,” she said, describing her depression at the time. “I remember talking to myself saying, ‘no, I can’t kill myself. I’ve got my kids to raise. I can’t, I can’t do that.’”She didn’t listen to the recording of the song until a day after it was made. As the bass began to reverberate through her car, everything went dark, she said, and she almost lost control of the vehicle. She pulled over, tears streaming down her face.“Even if you don’t believe it, this is my story,” she said. “I heard the voice saying to me, ‘Nomcebo, this is going to be a big song all over the world.’”And that prognostication soon proved true.In February 2020, a group of dancers in Angola uploaded a video showing off their choreography to the song, and challenging others to outdo them. As lockdowns were enforced just weeks later, the song was shared around the world.The global success of “Jerusalema” has taken Ms. Zikode on tour to Europe, the Caribbean and the United States. It also led to her being featured on the song “Bayethe,” which would win the Grammy award for Best Global Music Performance earlier this year.But while “Jerusalema” has brought her global renown, she has had to fight to earn any financial reward from it and to be recognized as part of its creative force.She sued her record label, and a settlement in December called for her to receive a percentage of the song’s royalties and to be allowed to audit the books of the label, Open Mic Productions, that owns the song.At least as important, the agreement also states that Ms. Zikode must be cited as the song’s “primary artist” alongside Kgaogelo Moagi, more commonly known as Master KG, the producer behind the instrumental track on “Jerusalema.”But even this victory in South Africa’s male-dominated music industry comes with significant caveats: For one, Master KG is receiving a higher percentage of royalties. And Ms. Zikode said she has yet to see payment. “I’m still waiting for my money,” she said.Open Mic did not respond to multiple requests for comment, but in a statement put out after her Grammy win, the label said: “She is a very talented artist and we welcome this agreement as a progressive resolution.”The global success of “Jerusalema” has taken Ms. Zikode on tour to Europe, the Caribbean and the United States.Alexia Webster for The New York TimesStruggles with money are nothing new to her.The youngest of four children born in a polygamous marriage, Ms. Zikode’s father died when she was young and her mother, the third wife, was left destitute. Desperate, her mother let a church outside Hammarsdale, a small town in South Africa’s eastern province of KwaZulu-Natal, take her daughter in for four years.There, she slept on bunk beds among rows of other children. She sewed her own clothes and helped to clean the dormitories. The church choir was a solace, but she sorely missed home until she was able to return in the 10th grade.Her mother sold maize or bartered what vegetables she could grow for secondhand clothes. The neighbors who would ask the young Ms. Zikode to sing for them would feed her and take her in for a few nights as her mother struggled.When she was old enough, Ms. Zikode learned to braid other people’s hair to earn some money, but remembers self-consciously pressing her elbows to her side, for fear that her customers would smell that she could not afford deodorant.But what she really wanted was to sing, and she got her break at an open-call audition. She spent years singing backup for gospel stars, sharing crowded apartments with other backing vocalists. When gigs dried up, she took computer classes as a career backup plan.Ms Zikode’s first major South African hit came in 2017 when she sang vocals on the song “Emazulwini” for a well-known house music producer and D.J., Frederick Ganyani Tshabalala. But what had seemed like a long-awaited break turned into a letdown when DJ Ganyani, as he is known, did all he could, she said, to prevent her from performing the song live on her own.“They try by all means to suppress the singers,” Ms. Zikode said of the D.J.s and producers who hold most of the power in South Africa’s music industry.DJ Ganyani did not respond to requests for comment.Hoping a record label would better protect her rights, Ms. Zikode signed with Open Mic, but once the deal was inked, the label went quiet, she said, and she was left hustling to record her debut album.Feeling abandoned by the record company, her husband and manager, Selwyn Fraser, sent messages to other artists, masquerading as his wife on Instagram and Twitter, trying to get bigger names to work with her.This outreach campaign connected Ms. Zikode with Master KG and resulted in “Jerusalema.”It’s not only the song that has made her a household name in South Africa, but also her very public fight for her royalties and recognition, in the courts and on social media, said Kgopolo Mphela, a South African entertainment commentator.“She’s coming across as the hero, or the underdog, taking on Goliath,” Mr. Mphela said.For all her struggles with reaping the monetary benefits of “Jerusalema,” Ms. Zikode’s musical career has made her financially comfortable and she now has a music publishing deal with a division of Sony Music.Her 17-year-old daughter and 8-year-old son want for nothing, she said. She and her husband renovated their home, adding an in-house studio.Ms. Zikode can also bask in the accolades that have come with her Grammy win for “Bayethe.”Ms. Zikode won a Grammy for “Bayethe,” which she performed with two other South Africans, the flutist Wouter Kellerman and the performer-producer Zakes Bantwini.Alexia Webster for The New York TimesOn a chilly April night in Johannesburg, in the Grammy’s afterglow, Ms. Zikode stepped out of a borrowed Bentley at an event to celebrate South Africans who have achieved international success.As she walked the red carpet, determined to own the moment, she granted every interview request, whether from the national broadcaster or a TikTok influencer. Later that night, she accepted two checks, one for herself and one for a charity she founded that helps impoverished young women.When she took the stage to perform the song that made her famous, she hiked up her gown to dance the “Jerusalema.” More