VIDEO: 'How I Met Your Mother' cast performs 'Les Mis' scene

Neil Patrick Harris and Jason Segel perform "Confrontation" on 'Inside the Actors Studio.

The nine-year run of “How I Met Your Mother” will come to an end Monday night. But devotees will always have episodes on Netflix, the cast will always have its memories, and Neil Patrick Harris and Jason Segel will always have their mutual love of the musical, “Les Miserables.”

The two actors first gave an impromptu performance of “Confrontation” between Javert and Jean Valjean on the Megan Mullally Show shortly after the sitcom first aired in 2005.

Now that the show is wrapping up, one fan requested an encore of the cast’s memorable off-primetime performance. During a recent episode of “Inside the Actors Studio,” an audience member asked if Harris and Segel could indulge them with another Les Mis duet.

They obliged with a show-stopping performance before bursting into laughter. See the video below, and catch the series finale on Monday night at 8 p.m. on CBS.