The M13 bacteriophage, a nature-inspired environmentally friendly biomaterial, is used as a perovskite crystal growth template and a grain boundary passivator in perovskite solar cells. The amino groups and carboxyl groups of amino acids on the M13 bacteriophage surface function as Lewis bases, interacting with the perovskite materials. The M13 bacteriophage-added perovskite films show a larger grain size and reduced trap-sites compared with the reference perovskite films. In addition, the existence of the M13 bacteriophage induces light scattering effect, which enhances the light absorption particularly in the long-wavelength region around 825 nm. Both the passivation effect of the M13 bacteriophage coordinating to the perovskite defect sites and the light scattering effect intensify when the M13 virus-added perovskite precursor solution is heated at 90°C prior to the film formation. Heating the solution denatures the M13 bacteriophage by breaking their inter-and intra-molecular bondings. The denatured M13 bacteriophage-added perovskite solar cells exhibit an efficiency of 20.1% while the reference devices give an efficiency of 17.8%. The great improvement in efficiency comes from all of the three photovoltaic parameters, namely short-circuit current, open-circuit voltage, and fill factor, which correspond to the perovskite grain size, trap-site passivation, and charge transport, respectively.