Where did this phrase originate? Niki stumbled upon a plausible answer on WikiAnswers.
In old England the pubs served their beer and ale in pints and quarts. As there was no legal limit or anything like that, the men in the pubs often got rowdy, belligerent, or started fights. The 'bar tender' would often have to shout over the chaos, "SIT DOWN! MIND YOUR PINTS AND QUARTS AND BE QUIET!" or something along those lines. Minding the pints and quarts meant dont slosh them around and spill them. This came down to us as a reprimand for rowdy behavior: Mind your P's and Q's.