Bovine viral diarrhea-mucosal disease (BVD-MD) is caused by bovine viral diarrhea virus (BVDV), and results in abortion, stillbirth, and fetal malformation in cows. Here, we constructed the phage display vector pCANTAB 5E-VHH and then transformed it into Escherichia coli TG1-competent cells, to construct an initial anti-BVDV nanobody gene library. We obtained a BVDV-E2 antigen epitope bait protein by prokaryotic expression using the nucleotide sequence of the E2 gene of the BVDV-NADL strain published in GenBank. Phage display was used to screen the anti-BVDV nanobody gene library. We successfully constructed a high quality phage display nanobody library, with an initial library capacity of 4.32×105. After the rescue of helper phage, the titer of the phage display nanobody library was 1.3×1011. The BVDV-E2 protein was then expressed in Escherichia coli (DE3), and a 49.5 kDa band was observed with SDS-PAGE analysis that was consistent with the expected nanobody size. Thus, we were able to isolate one nanobody that exhibits high affinity and specificity against BVDV using phage display techniques. This isolated nanobody was then used in Enzyme Linked Immunosorbent Assay and qRT-PCR, and ELISA analyses of BVDV infection of MDBK cells indicated that the nanobodies exhibited good antiviral effect.