This article is concerned with fixed-time synchronization and preassigned-time synchronization of Cohen–Grossberg quaternion-valued neural networks with discontinuous activation functions and generalized time-varying delays. Firstly, a dynamic model of Cohen–Grossberg neural networks is introduced in the quaternion field, where the time delay successfully integrates discrete-time delay and proportional delay. Secondly, two types of discontinuous controllers employing the quaternion-valued signum function are designed. Without utilizing the conventional separation technique, by developing a direct analytical approach and using the theory of non-smooth analysis, several adequate criteria are derived to achieve fixed-time synchronization of Cohen–Grossberg neural networks and some more precise convergence times are estimated. To cater to practical requirements, preassigned-time synchronization is also addressed, which shows that the drive-slave networks reach synchronization within a specified time. Finally, two numerical simulations are presented to validate the effectiveness of the designed controllers and criteria.