Pakistan has faced the most serious power shortage since the last decade, forcing utility operators to suffer periodic power outages. The preeminent cause of this “load shedding” is the production of energy from fossil fuels, the price for which is continuously growing. In this regard, the use of Diesel Generators (DG) has always been a preferred alternative because they are immediately available even at the higher Cost of Energy (COE). Due to Green House Gas (GHG) emissions, backup power generation based on DG has an adverse impact on the environment. So, it is the need of the hour to design a system that can generate electrical power by using more renewable energy and less DG and fossil fuels. Renewable energy has the ability to cope with energy crises, and it is now being implemented worldwide. This study addresses the energy crisis of grid-connected site of National Fertilizer Institute, Institute of Engineering and Fertilizer Research (NFC IE&FR), Faisalabad. The research is conducted by using available solar and biomass resources in addition to DG. For simulation purposes, the potential demand is validated, and available resources are identified. The system with multiple combinations of Renewable Energy Technologies (RETs) is anticipated to simulate with a Hybrid Optimization Model for Electric Renewables (HOMER). Optimization and size considering technical and economic factors, which include Net Present Cost (NPC) and COE and power generation rooftop PV are tackled using HOMER. Four cases are taken into account to investigate the most efficient and optimum microgrid option. Among all these four cases, a hybrid system based on PV, biogenerator, diesel generator, grid, battery and the converter, which is basically case-III of this study comes out to be the most feasible and cost-effective solution for TNPC & COE with reduced emissions and saving of the fuel. And more importantly, the use of the residuals of biomass energy left after the production of electrical power can be effectively used as agricultural fertilizer.