sounds like a bad misfire, you should have codes stored. If the car starts OK with no limp mode, you should be fine to drive home. Id keep throttle loads modest though. Good news is if it is a misfire, plugs and/ or a few new injectors outta take care of it.
E88 N54 Alpinweiss/Coral Red/Motiv HTA 3586r Tial .82AR/Motiv Port Fuel/Meisterschaft Race/Berk Resonated/ER CP/Synapse/VRSF FMIC/Rob Beck PCV Valve + Cap/ST Coilovers/M3 FCA + Tension Rods/M3 Subframe Bushings/M3 FSB/AA Strutbrace/DINAN Camber Plates/Apex ARC-8/Project Kics/VAC Hubs/Rogue Transmission Mounts/Alpina TCU Flash/Icarbon/Kerscher/BMW Performance