Stop it right there! The expression nip it in the bud means to put a quick end to something.

This phrase comes from the garden but has branched out. When a leaf or flower is beginning to form, it's just a little bud, and if you nip it — cut it — then it won't grow. You nip it in the bud. If there's a problem you're just finding out about, nip it in the bud before it becomes a full-blown disaster. If there's a critter problem in your garden, for example, nip it in the bud by putting a cage around your plants. If you start a bad habit, nip it in the bud before it gets bigger.

These sentences use nip it in the bud correctly to refer to stopping something before it grows or gains momentum:

By showing he has no intention of retiring, Putin hopes to nip a possible succession battle in the bud. (The Guardian)

If you don't nip this in the bud now, I guarantee you're going to have to do it in the future. (Slate)

Unless you're a guard dog, don't nip anyone in the butt! Nip it in the butt is just a mishearing of nip it in the bud — but this flowery phrase has nothing to do with rear ends or small, unused parts of something (two common meanings of butt). Even big publications get it wrong sometimes, as in this example:

In view of European history, the reverse would be the start of a very bitter road down a slippery slope and we have to nip this in the butt. (Time)

Ouch! To remember the correct expression, think of an unwanted weed or plant in the garden that you should nip in the bud before it grows out of control.