Motor freeweeling and regenerative brаking FOR DUMMIES
Voltage is not energy. It's only power (over time resulting in energy) if it flows through some resistance. 
When the upper switch is closed, current builds up due to the EMF on the motor coils, in some period of time (maybe tens of microseconds) it builds up to some peak current. You then open the upper switch and the current flows backwards through a diode in parallel with the lower switch (could be an external Shottky diode or the internal body diode of the MOSFET). You open the upper switch until the current drops to close to zero, then close it again, repeat until there's not enough to charge the battery, then you can short the motor and/or use mechanical braking.




Not shown, but very important, is the motor inductance which you can imagine as an inductor L in series with an ideal motor (the latter is a device that produces a voltage proportional to the shaft RPM and has some internal resistance, and creates a shaft torque proportional to current). 

That's two-quadrant (forward drive and forward braking) control with regenerative braking. If you want it to do the same thing in either direction you need twice as many switches.