This study aimed to examine serum pentraxin 3 levels in patients with primary liver cancer and to assess its potential as a diagnostic and prognostic biomarker. Serum samples were obtained from 180 patients with primary liver cancer and 180 healthy control subjects. The concentration of PTX3 in these samples was measured using an ELISA kit. The study also investigated the correlation between PTX3 levels and the clinicopathological characteristics of patients with primary liver cancer. The effectiveness of serum PTX3 in diagnosing primary liver cancer was evaluated using receiver operating characteristic (ROC) curves and their corresponding areas under the curve (AUC). The prognostic significance of serum PTX3 in patients with primary liver cancer was assessed using Kaplan–Meier survival curves. Serum PTX3 levels were elevated in patients with primary liver cancer compared to those in healthy control subjects. These levels were significantly correlated with drinking history, TNM stage, BCLC stage, tumor size, tumor number, and vascular invasion. However, no significant correlations were observed between PTX3 levels and other factors, such as age, sex, BMI, liver cirrhosis, histological grade, and histological type. With a cut-off value of 5.1 ng/mL, PTX3 effectively differentiated patients with primary liver cancer from healthy control subjects, achieving an AUC of 0.734, a sensitivity of 73.24%, and a specificity of 84.78%. Patients with higher serum PTX3 levels had lower overall survival rates and recurrence-free survival rates than those with lower PTX3 levels. Serum PTX3 levels are elevated in patients with primary liver cancer and high serum PTX3 levels are associated with poor prognosis. This suggests that serum PTX3 has the potential to be a novel biomarker for both the diagnosis and prognosis of primary liver cancer. These findings may improve patient outcomes by enabling early detection and continuous monitoring.