Watch CBSN Live

Neil Patrick Harris and Jason Segel sing "Les Miserables" duet

If "How I Met Your Mother" fans are feeling a little teary ahead of the show's series finale, this might be just the thing to brighten their day.

During the "HIMYM" cast's appearance on "Inside the Actors Studio," Neil Patrick Harris and Jason Segel gave an impromptu performance of "The Confrontation" from the musical "Les Miserables."

This wasn't the first time the pair has sung the song together -- they did it once before on "The Megan Mullally Show" in 2006.

With Harris as Javert and Segel as Jean Valjean, the duet was certainly...wait for it...legendary.

And there were plenty of other laughs that came out of the group's "Inside the Actors Studio" appearance -- check out another clip below.

The hour-long "How I Met Your Mother" series finale airs Monday at 8 p.m. ET on CBS.