The expression 'going off half cocked' means to start a course of action before being properly prepared, or to draw a conclusion about something whilst not in possesion of all the relevant facts.
The etymology of this phrase comes from the days of flintlock firearms, such as muskets, and refers specifically to the hammer mechanism of these weapons: A piece of flint, set in the hammer, was used to create a spark which would ingite a primer charge of gunpowder and cause the shot to be fired.
In order to prime the weapon the hammer had to be pulled back, or cocked, allowing the primer charge to be placed in the weapon's 'pan'. As a safety feature, the hammer mechanism would latch when it was cocked half-way open. The weapon could be primed with the hammer open in this position but, if triggered, the hammer would not have sufficient force to create the necessary spark. The loaded, 'half cocked' weapon could then be carried safely. In order to properly discharge the weapon, the hammer needed to be pulled back completely. Anyone attemtping to fire the weapon 'half cocked' was bound to be disappointed and, quite possibly, shot by his enemy!