Now that’s dedication! Neil Patrick Harris visited “The Late Late Show” on Monday night where he engaged in an epic show tunes riff-off with host James Corden.

MORE: Why James Corden Won’t Be Hosting the New ‘Carpool Karaoke’ Series

After Harris mocked Corden for winning a Tony for a non-singing role, the music-loving Brit decided to prove he has chops in the vocal competition.

Corden started off singing, “Sit Down You’re Rockin’ the Boat” from “Guys and Dolls”, to which Harris responded with the show-stopping “Everything’s Coming Up Roses” from “Gypsy”.

When it came time for ballads, Harris belted out “Being Alive” from “Company” while Corden tugged at the heartstrings singing “On My Own” from “Les Miserables”.

Eventually the pair came together to duet on “My Shot” from “Hamilton”, raps and all.

But it turns out that the stage battle was too much for Harris, who made a hilarious confession when they returned from commercial break.

WATCH: Neil Patrick Harris Shows Off Amazing NYC Townhouse — See What He ‘Stole’ From ‘How I Met Your Mother’ Set

‘When I went down on my knees there, I had a nice wardrobe malfunction and split my pants from my a** to my knee,” the Broadway veteran admitted. “I left it all on the stage for you.”

To see inside Harris’ NYC townhouse, watch the clip below!

More From ET: