Growing evidence suggests that abnormalities within the microstate sequence are associated with a wide range of mental illnesses. In this study, we aimed to evaluate the impact of higher-order microstate sequence syntax on brain cognitive processes. We first refined the microstate sequences obtained from the EEG recordings of individuals with epilepsy (EP) and those with psychosis of epilepsy (POE) into subdivisions in terms of microstate words. Subsequently, the microstate word characteristics and clustering degree features of different microstate word sizes were computed and compared. Finally, the correlation between word characteristics and the severity of POE was analyzed using Pearson's correlation coefficient and linear regression analysis. Our study showed that microstate B and the combined microstates {C, D} switch frequently in patients with POE compared to those with EP, whereas microstate A rarely switches directly with the combination {B, D}. In patients with higher Positive and Negative Syndrome Scale (PANSS) negative factor scores, we observed numerous continuous transitions involving {B, D}, {A, D}, and microstate C. Conversely, fewer continuous transitions of {B, C}, {C, D}, and microstate A could exacerbate psychiatric symptoms. Furthermore, while verifying the high-cohesion properties of microstate words on the time scale, patterns of "binary loop words" and "mirror word pairs" within brain microstate sequences were observed. Overall, the results demonstrate that mining higher-order syntax within microstate sequences provides novel methodological tools to understand brain cognitive processes and POE's pathological mechanisms, while offering clinical biomarkers for POE severity assessment.