I made a really stupid mistake. Me and some other graduate students were playing Dungeons and Dragons in my lab after hours (9 pm) this summer and we each opened up a beer and the cleaners called the cops on us. I think I'm going to get an academic censure because of it, which means I think that it will go on my transcripts. This is the only case of my misconduct, and I feel really stupid that I did it. My question is will this greatly affect my ability to go into a PhD program? I joined this masters program as a stepping stone, and have done very well academically and with my thesis in this program. I'm worried that all the progress I have made will go away because of one lapse of judgement.
I would do everything I can to prevent this going on my transcript. The first thing I would do is write a letter of apology to the cleaning crew for my misbehaviour. Do not approach the cleaners directly, but rather through their boss. Then I would contact the head of the MS program to explain what happened. While waiting for that meeting I would schedule a meeting with an alcohol counsellor so I could demonstrate I do not have a problem drinking. You may also want to enrol in a workplace sensitivity training course.
I cannot recall seeing an application with anything like this before. I don't think people would really hold it against you and you could explain it in your cover letter. That said graduate school admission is competitive.
I don't think you need to worry unless there's something more to the context. Drinking a single beer in a computer lab seems pretty harmless; the university might legitimately object to the risk of spilling your beer, but this should not be a career-ending mistake. On the other hand, drinking in a chemistry lab could be a very serious safety violation, especially if you were tending to an experiment during the game.
Assuming the only problem is a technical violation of the "public consumption" rule and that you retain the full support of your letter of recommendation writers, I doubt it will do you any harm even if it does end up on your transcript. You should look at your transcript before applying to see exactly what it says. You can then include a few sentences somewhere in your Ph.D. application addressing this issue and explaining that the "academic censure" was only because you had a single beer in a campus location not specifically permitted. This is very important, because to me the term "academic censure" sounds more like cheating or plagiarism.
Assuming you aren't applying to Brigham Young University or KAUST, I can't see why anyone would care about this sort of technicality. It would lower my opinion of the university, rather than the applicant. (On the other hand, if there's more to the story, such as safety violations, then you'll have to work harder to sort it out.)
Daniel’s and Anonymous’ answers are great, and I want to emphasize that they are not mutually exclusive. I’ll also add some tidbits:
Fight as much as you can to avoid it getting on your academic record. It may not matter much for admissions later on, or it may, you can never know for sure. It sure is easier if there is nothing to explain. You can tell the admission committee that “it was just a single beer”, but that's still just your word: all the official information they have is less informative and, probably, scarier than that. Also, being known from the start as “the guy with the beer-drinking record”, even if you get the position, may not be so good.
However: fight nice! Don't create stronger hostility than you already have…
If it does get on your record, be upfront and address it straight on in your cover letters. Doing so, people may not care so much. If you aren't upfront with it, they will definitely not take the risk.