Electric vehicles represent a shift towards sustainability in the automotive industry, with the Brake-by-Wire (BBW) system as an innovation to enhance safety, and performance. This study proposes an electromagnetic BBW system for Formula SAE vehicles, optimizing an electromagnet with a genetic algorithm as the actuator. Through a selection process from a million individuals, the system was modeled. Integrated with electric motors using CarMaker® software, the optimized electromagnet surpassed the minimum required force of 228.08 N without reaching its nominal current of 12.5 A, achieving a force of 231.1 N for 150 W power, indicating an energy efficiency of 0.706 N/Watt. The system also exhibited a response time of 17.92ms for an 80 bar increase, 1.52 times better than compared systems. Simulation under varying braking intensities demonstrated dynamic behavior, with settling times for slow, moderate, and sharp braking at 193 ms, 62 ms, and 21 ms, respectively. Efficiency during different braking scenarios yielded energy recovery rates of 33.25%, 8.18%, and 5.34%, respectively. These results validate the proposed system.