What do I need to do if the neutral bar is live in the panel box?
If the main breaker was on this would be expected if you put the breaker (in its on position) in before connecting the neutral and there was something turned on in the branch you were connecting. If something is drawing on a circuit there is going to be current flowing back through the neutral - that is what the neutral is for. It completes the circuit from the hot to ground.

A good way to think about this is to think about your wiring as plumbing. The hot wire is the water pipe, and the neutral is the drain line. When you turn on a faucet, it opens a circuit and the water flows from the water pipe into the drain. What you did is similar to what would happen if you left a faucet open, then turned on the supply line before you had the drain connected. It leaked.

If a light switch was turned on or something was plugged in, you completed the circuit when you got the wire close enough to your neutral bar for it to arc. This wouldn't happen if (as @NiallC points out) the main was turned off. If you were grounded and touched the neutral, it would have completed the circuit through you. You should never assume a neutral is safe if the branch is live.