Barney's love of magic is a large part of his over-the-top personality, and one of his greatest interests. He typically performs magic tricks whenever he wants to impress someone, or to add emphasis to what he's saying or doing. He's particularly fond of tricks involving fire, prompting the gang to even hold an intervention for him.
The following is a list of episodes where Barney performs magic.
Barney creates flames in his hands, to emphasize his Halloween devil costume.
Robin and Barney visit Lily's kindergarten class to talk about their jobs. Robin is depressed when she faces a lot of questions about why she doesn't have a boyfriend. When it's Barney's turn, he wows the kids with his fire magic.
Barney acts as a wingman to Marshall, who is single for the first time in years. To impress different girls they encounter at the bar, Barney performs magic tricks for them, by asking girls a question, and then shooting a fireball from one hand, catching it in his other hand, and opening his hand to reveal their answer, written on his palm.
The gang hold an intervention for Barney, about his frequent use of fire-related magic tricks. Barney scolds them, for holding an intervention, such a serious event, designed to help people with problems, simply to attack him for doing something they don't like. He finishes his speech to them by shooting a fireball from his hand, causing the Intervention banner to catch aflame and burn down.
Barney is distraught when Robin tells him that Nora isn't coming to the bar to join them. Disappointed, he releases a dove from his hand which he was going to use to impress Nora.
While singing to Nora, Barney lifts the microphone to reveal a bunch of fake flowers.
Barney makes a sheath of condoms suddenly appear, and then disappear up his sleeve before Nora can see them.
Barney has mysterious box in his bag, when he and Quinn. Security holds them both, and ask Barney to open the box, which he refuses to do as "a magician never reveals his tricks". When Barney finally agrees to show the security officers and Quinn the trick, it turns out to be a complicated one, which ends up proposing to Quinn, and she accepts.
Barney lies to Robin about burning the Playbook, which angers Robin and prompts her to tell him that he can't lie to her anymore if they are going to have a marriage together. He points out to her that lying is what he does best because as a magician, he knows how to misdirect and deceive people. He illustrates this fact by pulling out random magic tricks such as his favorite fire trick, his wand, a deck of cards seemingly glued together, intersecting rings, the little umbrella, a dove flying out of his hands, and a top hat that releases red and silver confetti when fluffed up. He finishes off by pulling out three fake bouquets to make Robin forgive him.