This research paper designs and analyzes a novel integrated solar-driven system for ammonia synthesis, freshwater production and power generation. The trigeneration system contains a solar thermal subsystem, a thermal energy storage system where the molten salt is used as a heat transfer fluid and storage medium, a solar energydriven Rankine cycle, a multistage flash distillation, a proton exchange membrane electrolyser array, and an ammonia synthesis unit. The proposed integrated system uses solar energy to charge the molten salt, which flows through a heat exchanger and generates steam for the topping cycle. The exhaust stream of the steam turbine provides heat for the multistage flash distillation (MFD) process. A 20 stage MFD unit is proposed where the seawater is utilized as the feedwater in this study. A portion of the produced freshwater is sent to the PEM electroylzer array for hydrogen production, which is used for ammonia production via the Haber-Bosch process. The thermodynamic analysis of the solar driven multigeneration system is analyzed through the Engineering Equation Solver (EES) and Aspen Plus software packages. The novelty of this study relies on the development of a new solar energy-based integrated system and its application for a selected community with over 10,000 residents to meet all of their needs to be self-sufficient and sustainable. Ammonia (for multiple purposes, such as fuel, energy carrier and feedstock), freshwater and electricity are the useful outputs as targeted in this paper. The study incorporates the phase change materials into the system for thermal energy storage purposes. The performance assessments based on energy and exergy efficiencies are carried out for the overall system and its components. Furthermore, the power, freshwater and ammonia production capacities are studied for better demand coverage. The overall exergy efficiency of the system is determined as 12.1 %, where the ammonia synthesis, power generation, and freshwater production capacities are 0.85 kg/s, 17.6 MW, and 143.97 kg/h respectively. Moreover, the study investigates the energy and exergy efficiencies with and without the presence of an air separation unit. The study results show that the air separation unit has less than 0.3% effect on the overall energy and exergy efficiencies.