Montresor is working from a position of "an eye for an eye," the Biblical notion that an injury should be punished with the same injury; this can be interpreted legally to say that an injured person has the right to mete out punishment to his attacker in a similar fashion. Montresor mentions the "thousand injuries" of Fortunato, indicating that there has been more than one slight on his personal honor, and so his final action is justified since it serves to punish Fortunato for all these acts, not simply one. Montresor also states his family's motto:
"These vaults," he said, are extensive."
"The Montresors," I replied, "were a great numerous family."
"I forget your arms."
"A huge human foot d'or, in a field azure; the foot crushes a serpent rampant whose fangs are imbedded in the heel."
"And the motto?"
"Nemo me impune lacessit."
(Poe, "The Cask of Amontillado, eNotes eText)
The Latin translates to "No one attacks me with impunity," which is also the motto of Scotland. Montresor believes his actions to be honorable and justified given his family's history and given the legal status of revenge; while he is murdering Fortunato in cold blood, it is only to regain face in the community and justified according to his own honor. If Montresor failed to take vengeance on Fortunato, his honor would be tainted and he would have failed to live up to his family name.
Since Montresor has been lying to Fortunato all along--even lying about the existence of a cask of Amontillado and lying about Fortunato's being his good friend--it seems likely that he is lying about his coat of arms and the motto. Both of these seem too appropriate for the occasion. Even if Montresor is inventing them on the spot, they still represent his sense of pride, injury, and desire for vengeance. Any reader can guess the meaning of the Latin motto without knowing the language. Nemo must mean nobody. Me means me. Impune must mean impunity, and lacessit is obviously a verb meaning something like the English word lacerate. Fortunato probably doesn't understand Latin. He simply says, "Good!" as if he not only understood but appreciated it. He doesn't know how good. Montresor does not have to kill Fortunato because of his family coat of arms or the motto. To assume this would be tantamount to assuming that there were no "thousand injuries"--that Montresor's pride is such that even one injury can result in a horrible retribution.