Sat at dueling pianos, Legend kicked off the performance by gushing over Puth, telling the 30-year-old singer what a big fan of his he is, before launching into his very own rendition of Puth and Wiz Khalifa's "See You Again," which is the first song he said he heard by Puth.
Puth returned the favor, telling Legend, "the first song I heard of yours was, the song that made me want to play the piano was...," he began before belting out Legend's "Ordinary People."
The back-and-forth continued with the pair each playing the piano and singing snippets of their most notable tracks, from "We Don't Talk Anymore" and "Tonight (Best You Ever Had)" to "Attention" and "All Of Me."
In a slight musical break, the pair revealed that they actually write songs together before teasing their forthcoming collaboration, "Dope."
The dueling piano performance closed out with Puth's latest tune, "Light Switch," which saw Legend dancing and singing along to the track while Puth played the keys.
The star-studded show was filled with monster performances, with iHeartRadio brining in some of the biggest names in music to perform live.
Hosted by LL Cool J -- who also performed during the jam-packed ceremony -- this year's show featured some incredible numbers from artists like Megan Thee Stallion, Måneskin and Jason Aldean to name a few.