Accurate linear brake-pressure control in a hydraulic control unit (HCU) of the vehicle dynamics control system, such as the electronic-stability control (ESC) system, can improve the control performance while significantly reduce noise and brake paddle vibration during the transient high-frequency brake-pressure control process. To minimize system cost, only simple switching solenoid valves and a master cylinder pressure (MCP) sensor are used in the ESC, thus an accurate real-time sensorless spool-position estimation is the key to the linear pressure controller. In this paper, a new sliding-mode controller (SMC) integrated with a nonlinear sliding-mode observer (SMO) is proposed to achieve a real-time linear controller for the switching valve in the HCU. First, a nonlinear SMO is used to observe the spool position based on the voltage and current values of the solenoid coil, from which the flow rate of brake fluid in the HCU of the ESC and the wheel cylinder pressure (WCP) can be deduced based on a specific hydraulic model of the solenoid valve and the braking system. Then an SMC is employed to adjust the spool position for accurate linear pressure control, taking into consideration the nonlinear characteristics of the electromagnetic force, the dynamic flow force, and the flow rate of the solenoid valve at different openings. Simulations and experiments were conducted, and the results supported the tracking ability of the sensorless linear pressure controller in different conditions. This study may provide a useful method to realize real-time linear control of high-frequency switching valve comparable to a high-performance proportional valve.