In this paper, a cascade control architecture for a brake-by-wire system suitable for motor racing applications is described. The system is composed of an electromechanical actuator, i.e., an electric motor, a transmission, a master cylinder, and a traditional hydraulic brake (pipe and caliper). Starting from a control-oriented model, a cascade control is proposed. An innerloop controls the position; an outer the pressure. The outer loop features an adaptation mechanism to cope with the intrinsic timevarying nonlinearity of the position-pressure relationship. The stability and robustness of the pressure loop are proven. Extensive experimental validation, conducted on an instrumented motorbike on a test circuit by a professional rider, shows the performance of the system.