The invention relates to a solar cell, and provides a method for preparing a polymer thin-film solar cell active layer through electrospinning, wherein by means of the method, full-spray-printing preparation of a donor material layer, a blending layer and an acceptor material layer can be completely at the same time. The method includes the first step of preparing an electrostatic spinning active layer solution, the second step of conducting lap joint on an electrospinning device and conducting preparation before entering a laboratory, the third step of preparing the donor material layer through electrostatic spraying, the fourth step of preparing a nanometer mesh-shaped porous structure of the blending layer through electrospinning, and the fifth step of preparing the blending layer and the acceptor material layer through electrostatic spraying. When the polymer thin-film solar cell active layer is prepared through the electrospinning technology, experimental equipment is simple, operation is convenient, material applicability is high, a prepared nanofiber membrane is high in specific surface area and is of a nanometer mesh-shaped porous structure, high mechanical strength is achieved, the contact area between a donor and an acceptor is greatly enlarged, and safety and circulating performance of the cell are improved.