The object of the present invention is to provide an ammonia-electric hybrid power system for ships with AC and DC main network, which includes an ammonia fuel engine, a first reversible motor, a second reversible motor, a third reversible motor, a lifting motor, a diesel generator set, a storage battery, Capacitors, fuel cells, propellers, liquid ammonia storage and supply devices, substation devices, ship power grids, ship loads, and ship cooling systems. The invention can realize the hybrid propulsion of the ammonia fuel engine and the dual motors, the coordinated power supply of the diesel generator set and the energy storage unit, realize the coordinated work of the AC and DC main network, and simultaneously realize the multi-stage utilization of the energy storage unit and the engine cold energy, reducing the cost of ships Energy consumption improves the efficiency of the whole ship, and it is equipped with a lifting motor, which is suitable for specific large ships.