In Depth

The Fine Art of Sleeping Around

Harris’ Womanizer on ‘How I Met Your Mother’ Catches Emmy’s Eye

Neil Patrick Harris closed out the third season of the CBS sitcom “How I Met Your Mother” by having a romance with pop star Britney Spears.

Aside from the huge attention Ms. Spears brought to the show with her two guest turns as a ditzy receptionist named Abby, it was business as usual for Mr. Harris’ womanizing and always well-dressed character, Barney Stinson.

Mr. Harris’ performance garnered him an Emmy nomination last year as supporting actor in a comedy series, a feat he hopes to repeat this season—even as he claims his character hasn’t accomplished much over the course of the past year, except sleeping with as many women as possible and not remembering their names.

“He crossed the line a bit this season and slept with the protagonist’s ex-girlfriend, which understandably caused a bit of a row. And they’re coming to terms with how bad that was,” Mr. Harris told TelevisionWeek during a set visit last month as the show wrapped production. “But I think what’s nice about the show and the character is that the writers, as ridiculous as Barney is, lace it with a little bit of humanity, so you get to see that he’s not just a strictly two-dimensional cad, but that he’s actually three-dimensional and has a heart somewhere.”

A television veteran who came to fame playing the young physician prodigy Doogie Howser, M.D., in the series of the same name in the late 1980s and early ’90s, Mr. Harris enjoys the fact that “HIMYM” is not shot in front of a live audience—even after several star turns on the Broadway stage.

“I’m a big fan of comedy, and I like the style that Carter Bays and Craig Thomas, amazing wunderkind producers, have created. I like the idea of having someone be just every level of awesome in his own little mixed-up mind,” Mr. Harris said. “It was a fun idea to not be the protagonist but to be sort of the antagonist. I look forward to that. And I’m not the biggest fan of television in front of live studio audiences. I find it oddly inauthentic. So the fact that this isn’t filmed that way was also a draw to me. And I’ve done the television chapter once before, so it’s nice to have a bit of perspective on it this go-round.”

Sarah Chalke and Will Forte also did guest turns this season on “How I Met Your Mother,” which co-stars Josh Radnor, Jason Segel, Alyson Hannigan and Cobie Smulders as Mr. Harris’ friends who live, love and work in New York City, using multiple flashbacks and narration as part of its storytelling technique.

But the appearance of Ms. Spears created a firestorm of attention.

“It was extraordinary for all of us,” Mr. Harris said. “It allowed a million people who had never seen the show to watch it for the first time and, I hope, see that it’s a funny show and continue to watch it. That’s the kind of publicity that money can’t buy. So, if for nothing else than just the attention she brought to the show, we’re very grateful for it. And it was fun to watch her, to stand next to Britney Spears and be seen with her. Everyone else just gets to see her on-stage or in magazines, but to get to know her and to talk to her, and sort of see how she ticks, was fun, too.”

Along with his character’s profligate and intransigent womanizing, one of the wells the series draws upon for laughs is Barney’s search for a wingman, a role formerly filled by Mr. Radnor’s character, Ted Mosby. Barney has even gone so far as to post an application form on his blog, in which he also answers questions about the “Bro Code,” the code of honor among men on the prowl for women. The document encompasses 83 amendments, including proclamations such as “A Bro may never pursue the mom of another Bro,” “A Bro will, whenever possible, provide his Bro with protection” and “A Bro will, in a timely manner, alert his Bro to the existence of a girl fight.”

“Barney needs and desires a wingman at all times, to give him purpose and to help him get more action,” said Mr. Harris. “Ted was the perfect guy, but unfortunately Ted wants to fall in love, which throws everything askew. He’s kind of smitten by Robin, Cobie Smulders, because she’s amazing and gorgeous, and smokes cigars, and drinks Scotch. And I think that’s confusing to him a little bit. But the show’s really about Ted and his quest for a lover. And Barney’s just the fifth-wheel jackass who makes acerbic comments about things. I don’t try to look too deeply into his soul.”