The use of photovoltaic (PV) technology in agricultural production can mitigate the environmental impacts of mushroom farming. However, changes in the environmental impacts and economic benefits of the application of PV technology are still unclear. Thus, we evaluated the environmental impacts, energy flow, and economic aspects of mushroom (Panus giganteus) farming systems without solar PV (WS) technology and with PV technology from the generation of substrate materials through harvesting. In addition to a 27 % increase in terrestrial ecotoxicity, P. giganteus farming with PV technology reduced all impact categories by 4–60 %, with a 60 % reduction in CO2 emissions and a 25 % reduction in land resources. These findings highlight the importance of combining PV technology with mushroom farming in agricultural carbon reduction and the efficient use of land resources. In terms of the climate change impact, the PV system reduced CO2 emissions by 2.94 kg CO2 eq./kg of mushrooms compared with the WS system, wherein the aspects of substrate transformation, spawn running, and cultivation were reduced by 78.27–89.91 %. The cumulative exergy demand (CExD) analysis showed that P. giganteus farming combined with PV technology reduced the total CExD by 48 %. With the application of PV technology, the top contributor to the total CExD of mushroom farming shifted from electricity to transportation throughout the supply chain. The PV system reduced costs by 22.09 % and increased the total revenue by 22 % and the cost-benefit ratio by 50 %. Halving the transportation distances of substrate materials and performing localized substitution of wood chips resulted in a 3–34 % reduction in the environmental impacts category and a 23–30 % reduction in nonrenewable fossil energy consumption. These results showed that improvements helped optimize the environmental performance in terms of carbon reduction and energy mixing. Thus, combining PV technology with greenhouse mushroom farming can improve trends in energy and environmental damage.