Let's get this out of the way: Barney Stinson is not a fun, goofy comedic character - he is a dangerous sociopath whose terrifying behavior is constantly enabled by his complicit group of friends. While the show certainly WANTED the audience to think of him as an overly-horny wacky guy, the way he was portrayed (and the way his behavior was constantly escalating) brought him into INCREDIBLY dark territory pretty frequently. In short, he's a goddamn monster.
1. His main "go to" move is...date-rape
Hopefully, you are someone who has at least the faintest understanding of and respect for the idea of consent in all relationships, but particularly when it comes to sex. What constitutes "consent" is a little difficult to outline in black-and-white terms, but the point is you should be communicating with your partner enough to be able to understand whether they are consenting, or if they are saying no or their judgment is too impaired to truly offer consent. That last point comes up frequently when alcohol is involved - there's nothing inherently wrong with two drunk people hooking up, so long as neither has become so drunk that they're unable to really make decisions and communicate. And ESPECIALLY when someone is so drunk they're on the verge of passing out, that's a pretty big no-no when it comes to consent. If you're losing consciousness, your thought process probably isn't exactly working at full capacity.
And wouldn't you know it - this is Barney's favorite move: get women drunk enough that they'll have sex with him. What constitutes "drunk enough" varies for Barney, but we know for a fact he takes it to a goddamn criminal extreme on at least a few occasions - namely in the season 2 episode "Moving Day."
See, Barney has a problem - in getting his extremely drunk targets back to his apartment from the bar, too often things go wrong: they get back together with their ex-boyfriends, they get arrested for indecent exposure, and...they fall asleep. The 20 minute cab ride takes too long, so he needs a spot closer to the bar - like Marshall and Lily's apartment located upstairs. Please let that sink in a moment - Barney thinks he has less than 20 minutes of consciousness with many of his targets, so he needs to have sex with them before they pass out. This is not someone who cares about consent at all - thankfully, at least he's not having sex with the women AFTER they've fallen asleep, but he's totally fine with trying to seal the deal with them as they're nodding off. This is pretty much the standard definition of date rape - and I don't know how that fits in the Bro Code, but it's definitely against the ACTUAL LAW.
2. He ENGAGED IN SEX TRAFFICKING (or worse)
In the episode "The Bracket", we're treated to some of Barney's worst crimes against women (a problem which becomes so wildly all-encompassing, they need to create a massive bracket to try to figure out whose life Barney ruined THE MOST). There was the usual mix of terrifying manipulation, using women as sex objects with zero regards for their feelings, and abandoning women in the woods and vulnerable to bear attacks (!) - but the worst one was an offhand mention that comes in late in the episode, about a woman who very notably does not actually appear:
"I've spent the last two days trying to remember every girl that I've slept with and all of the horrible things that I have done to them- and I have done some horrible things. I mean, at one point I'm pretty sure I sold a woman. I didn't speak the language, but I shook a guy's hand, he gave me the keys to a Mercedes, and I left her there."
The point of the episode is to force Barney to acknowledge his terrible behavior - which he (kinda) does by the end. But does he actually mean what he says about regretting his behavior? Given he immediately goes right back into it after this episode, the answer is pretty clearly "NO" - but especially when you consider that he's PRETTY SURE he sold a woman into sex slavery and has never even BROUGHT IT UP until now. He was never concerned about what happened to the woman at all - he just abandoned her to whatever fate she would find after he handed her off in exchange for a car.
3. He constantly made constant sexual advances on his "friend"
Alyson Hannigan's Lily has to put up with a lot over the course of the series - her husband Marshall is a mess of neuroses, his best bud Ted is genuinely one of sitcom history's biggest douchebags, and the 4th friend rounding out their group (pre-Robin) was none other than Barney Stinson, a guy known for making literally any mildly attractive woman in his vicinity immediately uncomfortable with his aggressive advances. And in case you thought Lily's status as part of the friend group gave her immunity to Barney's frequently creepy and awful behavior, think again!
No one's going to deny that Alyson Hannigan is very attractive (especially if you grew up watching Buffy the Vampire Slayer), but Lily is Barney's friend. The lines are clearly drawn - not only are they friends, but she's in a serious long-term relationship with another member of the friend group, Marshall. And so Barney's behavior around her comes across as extremely weird and uncomfortable (especially because it's MOSTLY centered around trying to see Lily's breasts).
Of course, there's a moment where things go too far. Barney's behavior really crosses the line when he actually breaks into Lily and Marshall's home in Long Island with a entire cleaning crew in order to find their sex tape. After tearing apart their whole house, he finally finds and steals it, and - while he's talked out of watching it - that's pretty goddamn creepy.
4. He constantly made sex tapes without anyone's consent
Speaking of sex tapes, let's talk about Barney's tendency to make sex tapes of the women he brings home to his bachelor pad - namely the fact that he has an elaborate camera system in place to record all of his one night stands, usually without their consent OR knowledge that they're being filmed. Hell, we even SEE ACTUAL PROOF of this in season 5's "The Rough Patch" - where he gives Ted a tape that features him walking towards the bed while telling the woman in it "No, baby, don't worry, the flashing green light means it's off."
If the show acknowledged that Barney was a dangerous sex criminal with no real likable qualities - like Dennis Reynolds on It's Always Sunny in Philadelphia (who also has an extensive collection of sex tapes made without the participants' consent) - it'd be fine. Dennis is SUPPOSED to be a dark, terrifying sociopath - but this show wants us to ultimately LIKE Barney and sympathize with him. They want us to believe he's a really nice good guy at his core - which is hard to go along with when he's pulling stuff like this CONSTANTLY.
5. Let's face it: he's a straight-up sexual predator
While Barney engages in a lot of absolutely illegal and downright evil behavior, he's also just (mostly) a genuine sociopath - mainly focused on using women as sexual objects, with absolutely no regard for their feelings or any hint of empathy living within him. For starters, his "playbook" for picking up and sleeping with women is some really gross MRA bullshit, designed to manipulate women with the sole intent of tricking them or breaking them down in a way that will lead to Barney's bed.
As the years went on, Barney's methods for sleeping with women became more and more elaborate and began featuring an array of periphery players. One of these individuals was the whimsically named "Port Authority Mitch" whose job it was to inform Barney whenever an aspiring actress arrived in New York. In Barney's own words the young women had, "...no idea of what a casting director could ask her to do, hold, or lick during an audition".
The man was operating a Harvey Weinstein level operation without even putting out a single film that wasn't a sex tape filmed without a woman's consent.
6. He did SOMETHING to the water in Lisbon...
I am happy to inform you that this entry is not a sex crime! In the episode "The Goat", Barney asks Marshall for his help at work. Marshall, the ever dutiful friend, believes Barney needs help with the various contracts on his desk and reads through them, horrified to discover that if they're not done properly, the United States may enter a war with Portugal, and that Barney and his company have tampered with the water supply in Lisbon.
While it's not specifically stated what exactly he did, we can assume that it wasn't good. Like, he was probably involved with compromising the water supply in some kind of extremely harmful way. Meaning that Barney Stinson is, according to the Geneva Conventions, a war criminal.