The invention provides a recombinant polynucleotide comprising a truncated glyceraldehyde-3-phosphate dehydrogenase (gpd) promoter and a modified HBV S protein gene and a transgenic Flammulina velutipes carrying the recombinant polynucleotide. The invention surprisingly found that after administering the transgenic Flammulina velutipes to a subject, the subject can successfully generate an antibody against HBV. Therefore, the transgenic Flammulina velutipes can be used as a vaccine against HBV.