The How I Met Your Mother alum, 43, got so into the battle he ended up splitting his pants, but that wasn’t the only comical moment.
Harris poked fun at the British host, 38, for having won a Tony award for a non-singing role, and show tunes hell broke loose.
Backed by some incredible philharmonic vocals, each one of the pair took turns attempting to outshine the other.
Corden began by belting out the Guys and Dolls tune “Sit Down You’re Rockin' the Boat,” which was met with Harris’ rendition of “Everything’s Coming Up Roses.”
They both impressed with their ballads. Harris took on “Being Alive” from the show Company, and Corden belted out Les Misérables' “On My Own.”
As well as a vocal battle, they got physical, dramatically pushing each other around and pulling off some Broadway moves.
They topped off their brilliant riff-off, that even included some bizarre face-licking, by performing a duet of “My Shot” from Hamilton.
But when they came back from the commercial break, Harris made a hilarious and rather embarrassing revelation.
“When I went down on my knees there, I had a nice wardrobe malfunction and split my pants from my ass to my knee,” he confessed. “I left it all on the stage for you.”
Check out the video for the full performance.
Sign up now for the Us Weekly newsletter to get breaking celebrity news, hot pics and more delivered straight to your inbox!