Speed regulation with simultaneous electric and fuel energy management in electrified aircraft engines is considered. An optimal control approach is formulated and solved that uses a weighted measure of stored energy and fuel consumption as cost function. The semiactive virtual control technique, originally developed for robots with regenerative drives, is suitably extended and used to treat the torque applied by the electromechanical subsystem upon the engine as an independent control input to be optimized. The standard proportional-integral loop used for the primary fuel flow control is maintained for compatibility with industry practice and gain scheduling and limit management logic schemes. A single tunable weight reflects design preferences for fuel or stored electric energy preservation. The magnitude of the weight yields feedback gains which can effectively reverse the direction of power flow between the engine and the electromechanical system, providing a direct way to induce power extraction or injection in transient and steady regimes. In the steady-state, infinite-horizon case, the optimal torque controller is shown to reduce to simple proportional action on the shaft speed plus a bias, paralleling standard linear quadratic tracking with a custom cost function. The paper includes simulation results using the gas turbine model included in NASA’s open-source T-MATS package (Toolbox for the Modeling and Analysis of Thermodynamic Systems) and a representative electromechanical system.