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/Meisterschaft Race/Berk Resonated/ER CP/Synapse/VRSF FMIC/FFTEC LPFP/HFS-4 DO Stainless Lines/BMS Thermostat Delete/Rob Beck PCV Valve + Cap/BMS OCC/ST Coilovers/M3 FCA + Tension Rods/M3 Subframe Bushings/M3 FSB/DINAN Camber Plates/Apex ARC-8/Project Kics/VAC Hubs/Rogue Transmission Mounts/Alpina TCU Flash/Icarbon/Kerscher/BMW Performance