The halal cart was shaking. Inside the hot tin box, the 85-year-old actress and cookbook author Madhur Jaffrey, masked in giant sunglasses and a rippling white wig, was hopping up and down and making profane gestures with both hands.
It was Day Two of the video shoot for “Nani,” a rap song by Zohran Mamdani, a young Queens M.C. who calls himself Mr. Cardamom. The elegantly feline Ms. Jaffrey — best known for her roles in the Merchant-Ivory film “Shakespeare Wallah” (1965) and, more recently, the NBC sitcom “I Feel Bad” — was incarnating a gangster granny who refuses to submit to her son’s bleating demands for less meddling and more dutiful child care.
In the video, which debuted Monday online, the character describes herself as “85 years gold” and “the best damn Nani that you ever done seen,” among other assertions too colorful for this newspaper. She is prone to slapping bothersome men on the street (who cower even as they loom over her) and insisting that restaurant maîtres d’ come grovel and refill her water glass.
“It’s like playing Lady Macbeth,” Ms. Jaffrey said. “If you’re an actress, you have to play everything.”
In what may be the unlikeliest pairing since Martha Stewart and Snoop Dogg, Ms. Jaffrey agreed last spring to appear in Mr. Mamdani’s video after he wooed her over a cup of chai.
“I thought, I can do this,” Ms. Jaffrey said. “Then I read the words.”
She watched rap videos as research, and grew nervous. The biggest challenge: to mouth the lyrics at top speed, while staying on the beat.
Ms. Jaffrey, known for her elegantly feline performances, plays a gangster granny in “Nani,” Mr. Mamdani’s homage to his grandmother in Delhi, India. CreditNicole Craine for The New York Times
The song was written two years ago as a homage to Mr. Mamdani’s then 85-year-old nani (grandmother), Praveen Nair, a former social worker in Delhi, India, and a founder of the Salaam Baalak Trust, which helps underprivileged children living on the streets. “She has gone against the grain in so many different ways,” he said.
This manifests in the video as a fantastical vision of her running a crime syndicate and recruiting children at Khan’s tutoring center in Jackson Heights, Queens, who are supposed to be preparing for the city’s Specialized High Schools Admissions Test.
“It’s an Indian ‘I Will Survive’ kind of song,” Ms. Jaffrey said.
For many in the desi diaspora, Ms. Jaffrey is a revered figure, almost single-handedly responsible for introducing the complexities of Indian food to the West, and asserting its place in the pantheon of great world cuisines.
A mutual friend approached Ms. Jaffrey on Mr. Mamdani’s behalf, and she was intrigued. The two met, and he pleaded his case, then proceeded to build the video around her, weaving in clips from her movies and TV cooking shows.
Mr. Mamdani, 27, was born in Kampala, Uganda, and moved to New York at age 7. In his official, buttoned-up life, he counsels homeowners facing foreclosure.
But he has always had an alter ego as a musician. As a junior at the Bronx High School of Science, he ran for class vice president with a rapped platform promising freshly squeezed juices for all. He lost.
Four years ago, he reinvented himself as Young Cardamom, and with his childhood friend Abdul Bar Hussein (a.k.a. HAB) recorded “Kanda (Chap Chap),” a rap about the fatty, greasy splendor of Ugandan-style chapati. (At one point in the video, the flatbread spins on a turntable.)
“#1 Spice,” the duo’s biggest hit, was written for the 2016 movie “Queen of Katwe,” where it is first sung by a child in Uganda selling salt, then blasted as a full-fledged rap over the credits: “Bring the flavor to the fish, bring the flavor to the rice / Who’s the number-one spice?” (The film was directed by Mr. Mamdani’s mother, Mira Nair, whose work includes the Oscar-nominated “Salaam Bombay!”)
Mr. Mamdani wanted his first solo video as Mr. Cardamom (“Better drop the act that I’m young,” he said) to be “a love letter to desi New York.” So the crew wound its way from an apartment in Parkchester in the eastern Bronx, a neighborhood home to many Bangladeshi immigrants, to Kabab King, a nostalgically dingy 24-hour diner and cabby sanctuary in Jackson Heights.
“The service is horrendous, and it’s beautiful,” Mr. Mamdani said. “You can make direct eye contact with someone and they will not come to your table.” The owners let him shoot without charge.
There were few frills on set. Mr. Mamdani asked a friend to arrange Ms. Jaffrey’s transportation, and was horrified to learn later that she’d had to share a Lyft from her home in Greenwich Village.
“Somebody carried my shoes,” Ms. Jaffrey recalled. Between takes, she swapped recipes with the crew and offered tips on difficult ingredients like bitter gourd: “We don’t cut down on the bitterness — we think it’s good for you.”
The shoot took place last May, during the holy month of Ramadan, a difficult time for a Muslim rapper to make a video celebrating food. Mr. Mamdani fasted for the first day, but couldn’t make it through the second, not with kebabs so close at hand.
It took nearly a year to finish the video. Among other obstacles, one would-be editor pocketed Mr. Mamdani’s hard drive and was never heard from again.
In the meantime, Ms. Jaffrey shot the first season of “I Feel Bad” (the series is awaiting renewal) and wrote a cookbook, out this May, dedicated to the pleasures of the Instant Pot. “If you follow my directions — not the Instant Pot directions — any rice comes out perfect,” she said.
When Mr. Mamdani tried to pay her for her work on the video, she refused. But she kept the yellow beret he had bought as a final, Che Guevara-esque touch for her costume. Mr. Mamdani likes to imagine her wearing it every now and then, eyebrow cocked, still prowling the streets as Nani.