At baseline, patients with PD had higher levels of CSF YKL-40 than HCs (p = 0.048). Linear regression showed that higher YKL-40 levels were associated with better cognition (HVLT Retention, β = 0.285, p = 0.034) and higher CSF biomarkers levels (T-tau, β = 0.479, p = 0.002; P-tau, β = 0.051, p = 0.002; Aβ42, β = 0.675, p = 0.007). The influence of YKL-40 on cognition was partially mediated by tau-related pathology (a maximum of 50.10%) and Aβ pathology (maximum of 40.50%). Longitudinal analysis showed that YKL-40 was negatively correlated with episodic memory (HVLT Total Recall, β = −0.002, p = 0.008), and positively correlated with CSF biomarkers (T-tau, β = 0.003, p = 0.005; P-tau, β = 0.002, p = 0.012). Higher YKL-40 increased the risk of PD-D by 149% (adjusted HR 2.49, p = 0.018).