The invention aims to provide a double-shaft double-motor ship ammonia-electricity hybrid power system with a fuel cell. The system comprises an ammonia fuel engine, a first reversible motor, a secondreversible motor, a third reversible motor, a diesel generator set, a storage battery, a super capacitor, a fuel cell, a propeller, a liquid ammonia storage and supply device, a power transformationdevice, a ship power grid, a ship load, a whole ship cooling system and an exhaust gas recirculation system. Hybrid propulsion of the ammonia fuel engine and the motor and coordinated power supply ofthe diesel generator set and the energy storage unit can be achieved. Meanwhile, multi-stage utilization of cold energy of the energy storage unit and the engine is achieved, waste gas of the fuel cell supplements gas for the waste gas turbine, the gas inlet efficiency is improved, ship energy consumption is reduced, the whole ship efficiency is improved, and the application range of the system iswidened.