In civilian life “on the double” means to do something in a hurry.
In the military, where the expression originated, it is usually a clear command most commonly barked by a drill sergeant ordering his men to do a task “on the double,” meaning to “stop walking and start running.”
Just as bugles were used to relay drills to soldiers in the field, drums were utilized on ships to summon sailors to their battle stations.
Double was an early reference to increase the drumbeat appropriately to convey urgency to all hands.