Arduino compatible H bridge behaving unexpectedly
With your circuit, the 2K resistors keep all the transistor on.
Since both the top and bottom transistors turn on at about the same level, they basically try to short the 9V to GND, causing around 188mA to flow, and heating the transistors with around 1W.
The fundamental design of this circuit is really flawed, as it also lets current flow into the arduino if it drives the lines with 5V
The way to solve this is by removing the positive feedback loop from the circuit
Instead of wiring the transistors to the middle of the H-bridge, we need to wire them away from those points. We can grab 2 extra NPN transistors, and use them to switch opposite pairs of top and bottom transistors for both directions.
This would look like:

Schematic
Note that by the nature of BJT transistors, it should only be used to drive low power DC motors, else the transistor get hot quickly