Gibbs' Rules are an extensive series of guidelines that Leroy Jethro Gibbs lives by and teaches to the people he works closely with.
Gibbs' rules originated from his first wife, Shannon, who told him at their first meeting, "Everyone needs a code they can live by." Years later, after their marriage, Gibbs began writing his rules down, keeping them in a small tin inside his home. Though he uses it often we almost never see the tin.
The knowledge of the rules' origins is left as a mystery to the people that Gibbs works with, though some of them do make concentrated efforts to find out. Tony makes several attempts to find out who taught Gibbs the rules, though he has not yet met with any success. On one occasion, he quoted Rule Nine as a rule that "they teach you in the Marine Corps," but the Marine in question was unaware of what he was referring to. On another occasion, Tony asked Jackson Gibbs if he had taught the rules to his son, but the older man denied any involvement. On the other hand, when Rule Twenty-Three was once referred to during a case, a nearby MP quoted the rule correctly.
Throughout the series, there have been two rules referenced as the first and third of Gibbs' rules. For some time, it was believed that the duplications were either continuity errors or that the list of rules was meant to be malleable. Eventually, however, Executive Producer Shane Brennan revealed that the duplication was actually intentional:
“Gibbs lives his life by a set of rules that took root from the first day he met Shannon. Over time, Gibbs added to the rules. When he joined NCIS, Mike Franks told him he didn't need dozens of different rules to be an agent... just three 'golden rules.' And this is why we have double ups on rules #1 and #3. Three of them are Gibbs' rules; three of them are Mike Franks’ rules. We are still to reveal the double-up on rule #2. And it's up to the fans to guess which of the rules were Mike Franks’ three golden rules and which were Gibbs'.” In spite of this, however, Franks seems to know Gibbs' rules as well as anyone, as evidenced in the episode "Patriot Down" when Gibbs passed the message "Rule #44" (First things first: hide the women and children) to him through Camilla.
While most of the rules are for everyday use, Gibbs' rules 40-49 are considered emergency rules, to be invoked only in the most dire of circumstances. When Gibbs told Abby that rule 40 was in play, and Abby told Tony, he took it to mean that "something unspeakably bad is going down."