I've tried something similar and had mixed results.
If the battery pack is charged already, then it will probably be held at about the right voltage as you drive, but:
If the battery pack is depleted, it will try to pull more amps than the 12v socket can supply, and will probably blow the fuse protecting that outlet.
And, if that 12v socket is 'hot' all the time, it could blow the fuse when you crank the starter.
The other problem as others will confirm is that the standard lighter/power port connections are 'iffy' at best, so its possible a few bumps in the road will dislodge the plug enough to cause loss of connection and/or heating or melting of the plugs.
There are many suitable ways to 'maintain' a batttery pack, but this isn't a very good or reliable way.