The association between blood lipids and cognitive function in schizophrenia is still controversial. Thus, the present study aimed to verify the association between various lipid parameters and cognitive impairment in schizophrenic patients and potential lipid pathways. A total of 447 adult inpatients with schizophrenia were divided into cognitive normal and cognitive impairment groups based on the Mini-Mental State Examination with a cut-off of 26. The blood lipid parameters were defined as abnormal levels based on the guideline. The liquid chromatography-mass spectrometry method was used to preliminarily explore the potential lipid metabolism pathway associated with cognitive impairment. There were 368 (82.3%) patients who had cognitive impairment. Herein, apolipoprotein B was positively associated with cognitive function in overall patients and age (≥45 and <45 years) and sex subgroups. After excluding patients with hypertension and diabetes, ApoB was still significantly associated with cognitive function in all the patients. The associations between other lipid parameters, including non-high-density lipoprotein cholesterol, low-density lipoprotein cholesterol, high-density lipoprotein cholesterol and triglyceride, and cognitive impairment were heterogeneous in age and sex subgroups. In contrast, total cholesterol and apolipoprotein A1 were not significantly associated with cognitive impairment. Metabolomics analysis showed that metabolic pathway mainly involved sphingolipid metabolism. Meanwhile, sphinganine and 3-dehydrosphinganine were positively correlated with lipid parameters and decreased in patients with cognitive impairment as compared to those with normal cognition. The present study suggests a positive association between lipids and cognitive function in schizophrenic patients and needs to be further verified by a prospective study.