Out of the two I would say working the heavy bag would be better overall cardio.
You can get good cardio by shadow boxing too.
Either way make sur eyou keep good technique.
The reason I say heavy bag is better cardio is because you can really cut loose on the bag.
Both are great cardio workouts, but the best cardio workouts in boxing are running and jumping rope.
these guys are wrong.. and its more then what u say..boxing is developed through a variety of training ...working on the mits increases a hell of alot of endurance ..and good well rounded coditioning it will help good boxing skills learning to throw a jab hooks and uppercuts ...then there is running running conditions your legs to keep u on your toes at all times jump rope can keep u up to so its good to keep that up as well ...bag work is good too..perfecting the punch and learning your combos...and maintaining good stamina ...there are a variety of training regements...but u need a good trainer to mold u into the best fighter u can be.........
None of these things helps your cardio, you need to run to develop the legs and cardiovascular condition to box.
Jump rope or running
To get a better workout is it better to do shadow boxing or punching a punching bag.?