The Phrase Finder explains the only thing that is clear about this expression is that it means you should “Be on your best behavior; be careful of your language.” The choices on the origin are:
- Minding pints and quarts while tallying drinks in English pubs (there’s little to support this one)
- Advice to printers and school children to avoid confusing the lowercase Ps and Qs (the favorite)
- Mind your pea (jacket) and queue (wig) (difficult to imagine why anyone would confuse the two)
- “Pee” as a coarse coat and “kue” as a man’s wig (again, difficult why those would be confused)
- Derived from an admonition to children to “mind their pleases and thank-yous” (which isn’t believed to lead to Ps and Qs)