Mechanical realization:
Muscat 1d12
Pistol 1d10
RoF 1/rd maybe a feat like crossbow expert.
Ban all inferior ranged weaponry especially bows, you may keep crossbows though. Reason: They do not penetrate armor anymore.
Otherwise you will have a conflict in dpr with bows which will turn out highly unrealistic
And, really, it's the iconography more than physics that has driven weapon stats in D&D since day 1. Why is the long sword the best weapon in AD&D? Granted, that's arguable, but, largely, it really is - best damage for a single handed weapon, best weapon vs armor adjustments for the damage it does, most common magic weapon etc. Because, well, the game is based on fantasy genre works and everyone and their mother in the genre uses a sword.
Realistically, a longsword should be far, far less effective than it is presented. Your sword was your weapon of last resort, by and large with spears and various other weapons being employed first because they were far more effective weapons.
When we're talking about guns, the same thing tends to apply. Sure, if we're talking wild west, guns are popular. But, shotguns were far, far more effective and more commonly used than pistols which were wildly inaccurate weapons. It would be much more likely that someone heading to a gunfight grabs a shotgun than a revolver. And, really, shotguns would probably be more commonly carried as well. Pistols in the mid- to late 19th century were just not a terribly effective firearm. If I'm more than about 50 feet away from you, you might as well use harsh language because you're not going to hit me.
[MENTION=4937]What you do not take into account is that the Longbow is totally ineffective versus any sort of plate armor, mostly ineffective vs. chain and even with padded armor you would stand good chances to be unhurt if the longbow hit you on a covered body part.
Remember back then injury meant high risc of infection and people dying from arrows which according to some historians was the highest fatality cause in warfare back then...
All of these lead to compromises somewhere if you try to integrate primitive firearms. Either you need at least give the m the highly unrealistic RoF of crossbows or some other gimmick. Would you just up the damage say they do 4d10 but need 4 rounds to reload, Then they will only be used as a opener for a first round of combat, because sitting out 4 rounds in 5e means the combat might be over already. So if you want to introduce them in a meaningful way, at least make them stand out in terms of usefulness versus other ranged weapons.
e.g. give them an advantage for the ini roll make them ignore armour, exploding dice etc.
If you do not care for this then the following might happen in your game: Let us take a standard situation in many movies and put that on a RP base: One guy threats the other with a loaded gun
It would be ridiculous to do this in 5e when the gun only did 1d8 on a standard attack Rolland then need some round or two to reload. Every level 2 and up PC would just ignore this threat.
We can't avoid the classic confrontation about realism vs gameplay. The trouble is firearms are cheaper than magic and if gunslingers are allowed then they would replace the hand-to hand or no-ranged combat classes (paladin, monks or barbarians).
Lots of time fans have forgotten the idea of enemies with firearms but not by the PCs, for example primitive tribe of na'vis living in a jungle and being invaded by goblins with their steampunk mechas.
Somebody could try to create low level tricks against firearms, for example a piece of ectoplasm to block canons or to water gundpower. And in a fantasy world some supernatural factions wouldn't want firearms by humanoids (giants, dragons, lord feys, war deities, knight orders..). The firearms couldn't work in the cities by a divine curse with an area effect. A war deity to punish firearms in the battlefield could summon an horde of petitioner warriors from the Walhalla with a bulletproof immunity, or to animate a squad of constructs only could be damaged by melee weapons.

(Dungeons & Dragons)
Rulebook featuring "high magic" options, including a host of new spells.