NEIL PATRICK HARRIS has walked out on his longtime lover David Burtka, and the two have been living apart amid claims both were seen flirting with younger guys, The ENQUIRER has learned in a blockbuster exclusive.

The former “How I Met Your Mother” star, 41, has been spotted leaving the couple’s spectacular $3.6 million New York City brownstone on his own at least four times since June, sources say.

On each occasion, Neil left before 8:30 a.m., with neither David, 39, nor the couple’s 3-year-old twins, Gideon and Harper.

Exclusive ENQUIRER photos snapped July 2 show, Neil – whose Tony Award-winning run as a transgender rock diva in “Hedwig and the Angry Inch” is nearly over – was seen moving boxes at the Harlem brownstone.

“If not a trial separation, it’s definitely been a time-out for them, and fueled mainly by suspicions that each one has cheated on the other,” said a source.

“David suspects that Neil’s late-night outings are less than innocent, while word has gotten back to Neil of his lover’s raunchy revelry in gay bars.”

Both men – who’ve been together since 2004, and engaged since 2006 – are “highly flirtatious,” according to another source.

“While David might come across as the ‘Mr. Mom’-type in the relationship, saddled with kids on the home front while Neil does Broadway, the reality is actually quite different,” said the source. “When David is feeling his oats frustration with Neil, he’ll hand the kids off to their nanny and make a beeline to one or both of his favorite gay watering holes, either Therapy or Industry Bar.”

Meanwhile, Neil discourages David from meeting up with him after “Hedwig” shows, said a source, who claims to have spotted David only once in Neil’s SUV outside the Belasco Theatre.

“Neil will go out to dinner – Japanese food is a particular favorite – and then maybe hit some bars,” said a source. “After a few drinks and loosening up some, it’s not long before he’s on the prowl. His type is 20-something models who identify as being straight.”

A bartender at the Red Rooster restaurant in Neil’s neighborhood said he recently saw the former “Doogie Howser, M.D.” star sitting alone on a bench in Marcus Garvey Park, a block south of his brownstone, and ogling the local sights.

“Neil’s eyes were glued to these shirtless young black and Latino guys with ripped abs who were hanging out and strutting their stuff,” said the source. “Judging by the smirk on Neil’s face, he sure seemed to appreciate the show.”

In yet another sign of Neil possibly straying, after appearing on “Good Morning America” in June, he was seen entering the Phillips Club at Lincoln Square, a private high-end extended stay hotel, with a “hot blond twink in tow,” said an eyewitness.

As The ENQUIRER has reported, another major issue plaguing the couple – who are living in a rental property until the brownstone is move-in ready – is Neil’s refusal to set a date to tie the knot. In a recent interview Neil didn’t sound any closer to making a firm commitment on that score.

Asked about wedding plans, Neil – who stars with Ben Affleck in the upcoming drama “Gone Girl” – said: “When things calm down. They just haven’t calmed down for the past few years!”

Meanwhile, insiders say David is nagging Neil to say, “I do.” “That’s the last thing he wants to hear as he comes down the homestretch with ‘Hedwig,’” said a source. “After almost five months in the role, Neil’s physically drained. He’s lost over 20 pounds and has a short fuse for David’s demands.”