The celebrities performed the act for Drop the Mic, a TBS show which airs at 10:30 p.m. on Sundays.
TBS posted a preview for the episode on Thursday. Mendes -- the singer of Treat You Better and Stitches -- and Beckham walked down to the stage wearing boxing robes in the preview.
Beckham went first with his dis track.
"Bieber also came down here to make noise," he said. "I said, 'why the hell does Canada keep sending us these little boys?' No matter what you say, my ego won't burst. Because whatever you though, John Mayer did it first."
Mendes answered back by taking a swipe at the three-time Pro Bowl selection.
"Ok, a dancing athlete, that's a little unusual," Mendes said. "It's the first time that I've seen that since High School Musical."
"Your skin is so pale, just call it a hunch. You're so white the only meal you eat is brunch," Beckham said.
"Yeah, you said that I'm fake. I think millions disagree," Mendes responded. "How do they ever call you a Giant when you are shorter than me?"
The Beckham and Mendes rap battle airs Sunday on TBS. The Giants began their voluntary nine-week offseason program on April 9. New York begins voluntary minicamp on Tuesday. Mandatory minicamp is from June 12 to June 14.