Three may keep a secret, if two of them are dead.
Franklin uses dark humour to make a practical point about secrecy. Once information is shared with several people, control over it is weakened because every additional person creates another possibility of disclosure. The exaggerated claim that a secret is safe only when two of three people are dead emphasises how difficult complete confidentiality becomes once knowledge is distributed.
The saying does not mean that trusted people can never keep confidences. Its broader lesson is about risk rather than certainty. A secret known by one person depends on one person’s discretion; a secret known by many depends on the discretion, judgement and circumstances of everyone involved. Franklin therefore presents restraint in sharing sensitive information as the most reliable way to protect it, especially when the consequences of disclosure would be serious.