For context, here is the song , and here are the 10 commandments
The challenge, demand satisfaction If they apologize, no need for further action
If they don't, grab a friend, that's your second. Your lieutenant when there's reckoning to be reckoned
Have your seconds meet face to face. Negotiate a peace, Or negotiate a time and place
If they don't reach a peace, that's alright. Time to get some pistols and a doctor on site. You pay him in advance, you treat him with civility. You have him turn around so he can have deniability
Duel before the sun is in the sky. Pick a place to die where it's high and dry
Leave a note for your next of kin. Tell 'em where you been. Pray to hell that heaven lets you in
Confess your sins. Ready for the moment of adrenaline when you finally face your opponent
Your last chance to negotiate. Send in your seconds, see if they can set the record straight
Look 'em in the eye, aim no higher Summon all the courage you require
10 paces, fire!
Im especially curious if the line about doctors turning away for deniability has any sort of historical basis.
The commandments are a rough reflection on the rules and expectations in conducting a duel in the period. With some modification from an earlier response of min, I'd start by noting there are a number of dueling codes you can find written out at various times, but they were simply the codification of what was custom at the time, so are a snapshot at a specific point in time for what really were evolving norms.
As such, there isn't specifically "exact rules of duels" that you might be looking for. So that being said, the single most influential code, and that which we find generally followed in the early US even if with some variation, was the 1777 Code Duello from Ireland, so I'll run through the "Ten Commandments" and compare them to the 25 Rules of the Code Duello (later amended to add two more), as well as any additional commentary that might be warranted. Not everything in the Code Duello is reflected in the Commandments, and as Ten is much pithier than "27 Duel Commandments" there is also some combining of rules, and additionally some Commandments aren't really reflected in the Code, even if they reflect convention.
The challenge: demand satisfaction
If they apologize, no need for further action
This is, basically Rule 1 in a nutshell, although a number of rules deal with the intricacies of challenges, their severity, and what they require. In some cases it rules that no apology could be given, such as for a blow. If you were unwilling to exchange shots for your offense, the only alternative was "handing a cane to the injured party, to be used on his own back, at the same time begging pardon", as per Rule 5. I digress though. Rule one reads:
The first offence requires the first apology, although the retort may have been more offensive than the insult; example: A tells B he is impertinent, &c., and B. retorts that he lies; yet A must make the first apology, because he gave the first offence, and then (after one fire) B may explain away the retort by subsequent apology.
If they don’t, grab a friend, that’s your second
Your lieutenant when there’s reckoning to be reckoned
There are several rules concerning Seconds, and how they must be. Rule 14 lays this out:
Seconds to be of equal rank in society with the principals they attend, inasmuch as a second may choose or chance to become a principal, and equality is indispensable.
Have your seconds meet face to face
Negotiate a peace…
Or negotiate a time and place
And Several rules give some basics on negotiations. Rule 15 on issue of challenges:
Challenges are never to be delivered at night, unless the party to be challenged intend leaving the place of offence before morning; for it is desirable to avoid all hotheaded proceedings.
While Rules 16 deal with choice of weapons and 17 with technical matters the day of. The process of negotiations is not really dealt with in any detail, although many dueling enthusiasts wrote their own books which gave their advice from experience.
If they don’t reach a peace, that’s alright
Time to get some pistols and a doctor on site
You pay him in advance, you treat him with civility
You have him turn around so he can have deniability
Nabbing from an earlier response, having a doctor in attendance was not required by the dueling code, but it was certainly common, not just in the United States but in Europe as well. In correspondence prior to the Burr-Hamilton Duel, Burr's party had been informed by Hamilton's party that Hamilton would be providing the physician, "H-----" in advance. As regards the second, this was for very hair-splitting legal reasons that the attending doctor wouldn't view what happened, so that if brought to court as a witness, the Doctor could honestly testify that he never saw the duel occur. In England at least, it was common for a doctor attending a duel, in the case he ended up a witness in court, to state that he had simply happened to come across the wounded man while taking his morning stroll.
In the case of Hamilton, Dr. David Hosack was his personal physician (and had attended Philip Hamilton when he was felled in a duel), and had come to Weehawken with Hamilton's party. He didn't go that far, but testified that he did not even know who the opponent was until after the duel had occurred. I would note however, that according to his testimony, he didn't merely "turn around". This was the case with the two boatsmen who had brought the duelists to the site, but Hosack stated that he was some distance away, separated by some woods. The last he saw of Hamilton was him walking off with the seconds to the dueling ground, following which he heard the shots, and was then summoned. Burr was already leaving the dueling ground, and his second, William P. Van Ness, apparently used an umbrella to shield the face of his primary from view of the doctor (Purely for convention's sake, since Van Ness was the one who later told Hosack that Burr had been the other one).
Duel before the sun is in the sky
Pick a place to die where it’s high and dry
Again, nothing mandating when or where exactly, but early morning was very popular, and certainly it would suck to duel in a marsh, a British duel in the early 1700s was infamously done in wetlands, and was quite horrid by all accounts. However, especially in the US, sandbars in the middle of rivers that made state borders were popular as they were ambiguous with regards to jurisdiction. Decidedly not "high and dry". For New Yorkers though, the bluffs at Weehawken, rightly described that way, were a popular spot.
Leave a note for your next of kin
Tell ‘em where you been. Pray that hell or heaven lets you in
Another thing the Code Duello doesn't deal with but this does touch on common practice of not telling family members (well, female relations and children) about an impending duel.
Confess your sins. Ready for the moment of adrenaline when you finally face your opponent
So while certainly you can confess, dueling was considered a mortal sin by the Catholic Church, and given similar censure in various Protestant faiths (Kiernan wryly notes this is one of the few places they were in full agreement). Hamilton had to try three times, in fact, before he was given his final communion, and then only after deep profession of repentance and impressing on Bishop Moore his claim that he never intended to fire. I've written on dueling and religion before here.
Your last chance to negotiate
Send in your seconds, see if they can set the record straight…
Yep, this is definitely your last chance to negotiate, and Rule 21 agrees:
Seconds are bound to attempt a reconciliation before the meeting takes place, or after sufficient firing or hits, as specified.
But it was to be understood that as per Rule 7:
But no apology can be received, in any case, after the parties have actually taken their ground, without exchange of fires.
That is to say, the Seconds had to reach an agreement before the duel was about to start. An apology given while at your mark was dishonorable, and presumed to come from cowardice.
Look ‘em in the eye, aim no higher
Summon all the courage you require
General advice more than a rule, but good ones. Courage was certainly needed - many of the aforementioned books impress the need for sang froid, and making sure not to aim high was good advice too. A jittery duelist might pull the trigger too hard, and if you already were aimed high, it would go even higher. Don't aim at the eyes though, chest is better I'd say.
Ten paces!
Fire!
Distance was not set, and could be determined by the parties. This is set out in Rule 17:
The challenged chooses his ground; the challenger chooses his distance; the seconds fix the time and terms of firing.
Still, Ten Paces was by far the most common distance. Various means to signal to fire were laid out in Rule 19:
Firing may be regulated, first by signal; secondly, by word of command; or thirdly at pleasure, as may be agreeable to the parties. In the latter case the parties may fire at their reasonable leisure, but second presents and rests are strictly prohibited.
There were various ways it could be done. In the case of Burr-Hamilton, the order given was "Present!" not "Fire" though. Nathanial Pendleton, Hamilton's Second, wrote them out in advance, and on this matter the rules set were:
The parties having taken their positions one of the seconds to be determined by lot (after having ascertained that both parties are ready) shall loudly and distinctly give the word "present" - If one of the parties fires, and the other hath not fired, the opposite second shall say one, two, three, fire, and he shall then fire or lose his shot. A snap or flash is a fire.
So that is the sum of it. Overall, the "Ten Commandments" well reflect with rules and norms of dueling from the time with some creative license granted.
For broader commentary on the conduct of the duel I'd point here where I have several answers on the topic, and here for further reading.