H-bridge with 2N2222 transistors - input voltage is chopped
You have discovered the standard problem when building an H-bridge. If
you want to drive it with a voltage lower than its output voltage, then
you cannot directly control the high-side transistors.

There are several solutions to this problem. The simplest and most
reliable is to buy an already built H-bridge. If you really want to
build it yourself, then you will need extra transistors to drive the
high side.

Below is an example using only NPNs. It's a half-bridge which behaves
like an inverter. You would use two of those to build a full bridge.







simulate this circuit &ndash; Schematic created using CircuitLab

Here, the leftmost transistor is used to drive the high-side one.
I didn't label the resistors, as their values will depend on how much
current you want.

This is not the only possible schematic, and probably not the best.
There are many other options, including NPN/PNP combinations,
Darlingtons and MOSFETs.