Producer Brandon Lee claims the track features his song "Broad Day" and he wants acknowledgement and payment.
Lee insists the chord progression and tempo on both songs are the same and they incorporate guitar and wind instruments.
Lee is suing Lil Nas X, Sony Music Entertainment and Columbia Records, as well as Cardi's former manager, Klenord Raphael.
It's not the first time the "Old Town Road" star has been accused of swiping a sample from another artist without permission. Fiona Apple recently claimed his mixtape track "Kim Jong Un" featured a snippet of her song "Every Single Night".
"You're probably really great, but you used my song 'Every Single Night'," she said. "You sampled that song, too, in a song called 'Kim Jong Un', I think. And, um, hey... where's my money, you cute little guy? Where's my money?"
Lil Nas X resolved the issue by suggesting he and Apple "should do something together for my album."
She responded: "I would love that! This is such a good ending to this little story."