Pulmonary embolism (PE) is a serious and potentially life-threatening condition that requires prompt diagnosis and treatment. Identifying risk factors and diagnostic markers can aid in the early detection and management of this condition. This case-control study examined 10,077 patients admitted to Shenzhen Kangning Hospital's psychiatry facility in 2020. Among these, 65 patients were diagnosed with PE, including 50 new cases. After survival sampling for controls and age-and-gender matching, the study included 41 new PE cases and 41 age-and-gender-matched controls. Data on demographics, comorbidities, and medication use were extracted from electronic records. Conditional logistic regression analyses were performed to determine the association between each predictor and PE risk. Additionally, the sensitivity and specificity of the d-dimer diagnostic tool were assessed. In univariable conditional logistic regression, active alcoholism was associated with a higher PE risk (OR=3.675, 95% CI 1.02-13.14, P=0.046). A history of physical restraint (OR=4.33, 95% CI 1.24-15.21, P=0.022) and chemical restraint (OR 4.67, 95% CI 1.34-16.24, p=0.015) also increased PE risk, as did benzodiazepine use (OR=3.33, 95% CI 1.34-8.30, P=0.010). Conversely, psychotropic medication before admission was associated with a lower risk of PE (OR=0.07, 95% CI 0.01-0.59, P=0.013). Stepwise multivariable forward conditional regression identified two subsets of psychiatric patients at higher risk of PE: new psychiatric cases without medication at admission who were chemically restrained, and cases without medication at admission who were started on antipsychotics and benzodiazepines. The d-dimer diagnostic tool, with an optimal threshold of 570 ng/ml determined by the Youden index (J statistic of 0.6098), showed a sensitivity of 73.17% and specificity of 87.80% for detecting PE, with an AUC of 0.833 (95% CI: 0.735-0.906). Our findings suggest that a history of restraint, alcoholism, and the use of antipsychotics and benzodiazepines are important predictors of PE in psychiatric inpatients. Conversely, psychotropic medications at admission may be linked to a lower PE risk. The d-dimer diagnostic tool shows good value for screening PE in psychiatric inpatients. These predictors and diagnostic markers could help clinicians identify high-risk patients and implement appropriate prevention strategies.