Global warming has increased the use of renewable energy in energy systems. In this regard, the present work presents an innovative polygeneration system to produce power, ammonia, and process steam using solar, biomass, wind, and geothermal energies. By using a solar-syngas hybrid boiler, steam has been created in two high-pressure (HP) and low-pressure (LP) levels, and the HP steam is used for the gasification process. Syngas produced from biomass gasification process produces ammonia with the nitrogen obtained from an air separation unit by going through water gas shifting and carbon capture processes. Power consumption in the mentioned sections is produced by wind turbines. A Brayton cycle with ammonia and hydrogen hybrid fuel has been used to produce power and heat. The integration of supercritical CO2 and organic Rankine cycles with the hot flue gas output from the Brayton cycle has reduced heat losses and increased power generation. The presented renewable system has been analysed from the point of view of energy, exergy, exergeoeconomic, and exergoenvironmental (4E) methods. The overall results indicate that the total energy and exergy efficiencies are 31.33% and 38.53%, respectively. Also, the cost rate and environmental impacts of the whole system are calculated as 3222.35 $/h and 53.16 Pts/h, respectively. Meanwhile, the levelized cost and environmental impacts of electricity are equal to 0.18 $/kWh and 0.003 Pts/kWh, and the presented system is capable of producing 297.86 ton/day of ammonia.