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 FBO N54 Alpinweiss/Coral Red/Meisterschaft Race/Berk Resonated/Macht Schnell 3"/ER CP/Synapse/VRSF FMIC/FFTEC LPFP/HFS-4 DO Stainless Lines/BMS DCI/BMS Thermostat Delete/Rob Beck PCV Valve + Cap/BMS OCC/Cobb E60/ST Coilovers/M3 Front Control Arms + Tension Rods/M3 Subframe Bushings/Apex ARC-8/Project Kics/Macht Schnell Studs/Rogue Transmission Mounts/Alpina TCU Flash/Icarbon/Kerscher/BMW Performance/Cyba