I think you may be looking for Highlander: the Animated Series
The series is set in the far future of the 27th century. The last living descendant of the original Highlander fights against the evil dictator Kortan.
The story unfolds on post-apocalyptic Earth, after a meteorite collision nearly wipes out all human civilization after setting off nuclear weapons. Following this catastrophe, Connor MacLeod (the protagonist of the original film) and the other Immortals forswear the Game of fighting each other until only one Immortal remains to win the Prize. Instead, the Immortals swear to preserve human knowledge and help humanity. They cast away their swords and call themselves Jettators (from the French jette, "thrown away".)
But one Immortal, Kortan, refuses to swear the oath, he still seeks the Prize and now wishes to dominate the world. Connor challenges Kortan to a duel and is defeated and killed, as any Immortal who breaks the oath is destined to die. However, with Connor's death comes the prophecy of the rise of a new Immortal, unbound by the oath, who will defeat Kortan. Uncontested by the Jettators and nigh-unkillable by mortals, Kortan establishes an empire controlling most of the planet, which he rules from his fortress Mogonda.
Seven hundred years later, a Highland youth named Quentin is killed trying to defend his clan, the Dundee, from Kortan's slavers. He is the prophesied Immortal and returns to life. His dying mother reveals his true identity to be Quentin MacLeod from clan MacLeod, "The Last of the MacLeods". Quentin meets the Jetattor Don Vincente Marino Ramirez, who becomes his mentor. Ramirez teaches Quentin about Immortals and his mission to confront Kortan, and trains him in combat.
Accompanied by Ramirez, his adoptive sister Clyde, and their pet Gaul, Quentin seeks out the Jettators to gain their Quickening and their knowledge, not by beheading, but by a sharing as MacLeod and the Jettator grasp the same sword simultaneously (although the effects are sometimes just as destructive to the surrounding area). In the wake of a sharing the Jettator becomes mortal and often his or her sword shatters to signify this. With the wisdom of Ramírez and the Quickenings of the Jettators, Quentin may be able to destroy Kortan.
A gun shows up in episode 4, "The Last Weapon".
Ramirez is teaching Quentin about balance in a fashion that should seem very familiar to fans of the original film. Nearby, the Dundees are terrorized by a gang sporting a machine gun. MacLeod and Co. hunt them down to their headquarters, where the group's leader is intending on attacking Moganda. Quentin takes the gun away from a priest and begins using it on the gang. Ramirez admonishes him to not use this weapon, but Quentin is drunk on the power it gives him in wielding it. Eventually, he accidentally shoots Clyde in the arm and comes to his senses. The gun is discarded and the heroes continue on their journey. This episode is notable for a flashback to 20th Century warfare.