Yes, disconnecting (or connecting) power or load while inductive loads (motors) are active may cause temporary transients that are higher than the rated maximums for your circuitry.
If you can't make even a simple sketch work (that, say, turns on the H-bridge to drive the motor one direction only,) then it's likely the driver or perhaps the Arduino has been damaged.
Using a logic analyzer, oscilloscope, or worst case, multimeter, you can measure where the signals are going, and then compare to what's supposed to happen, to troubleshoot what's going wrong.