Background Hepatocellular carcinoma (HCC) is a malignant tumour with high mortality. In recent years, microRNA (miRNA) has been recognized in the diagnosis and prognosis of cancer. miR-487b has been found to play a role in a variety of cancers. The purpose of this study is to explore the role of miR-487b in the diagnosis and prognosis of hepatitis B virus (HBV)-related HCC, and its influence on the biological behaviour of HCC cells. Methods Quantitative real-time polymerase chain reaction (qRT-PCR) method was used to detect the expression level of miR-487b in the serum of HCC patients, HBV patients, and healthy people. The ROC curve was used to evaluate the role of miR-487b in the diagnosis of HCC. The prognostic significance of miR-487b in HCC was analyzed by the Kaplan-Meier survival curve and Cox regression model. The effects of miR-487b on cell proliferation, migration, and invasion were explored through MTT assay and transwell assays. Results The expression level of miR-487b in the serum of HBV-related HCC patients was significantly higher than that of CHB patients and normal healthy people. The expression level of miR-487b can distinguish HCC patients from CHB patients or normal healthy people. High expression of miR-487b was associated with poor prognosis, which could be used as an independent prognostic factor for HCC. The upregulation of miR-487b promoted cell proliferation, migration, and invasion. Conclusion miR-487b can be used as a biomarker for the diagnosis and prognosis of HCC.