The invention discloses a system and a method for generating power by means of sludge. The system comprises a drying device, a heat accumulating type revolving bed, a gasification and melting reaction chamber, a heat exchange device and a power generation device, wherein a sludge inlet, a dried sludge outlet, a drying water outlet, a steam inlet and a cooling water outlet are formed in the drying device; a raw material inlet, a pyrolytic water outlet, a pyrolytic oil gas outlet and a pyrolytic carbon outlet are formed in the heat accumulating type revolving bed, and the raw material inlet is connected with the dried sludge outlet; a pyrolytic oil gas inlet, a pyrolytic carbon inlet, a thermal-state synthesis gas outlet and a slag outlet are formed in the gasification and melting reaction chamber, the pyrolytic oil gas inlet is connected with the pyrolytic oil gas outlet, and the pyrolytic carbon inlet is connected with the pyrolytic carbon outlet; a thermal-state synthesis gas inlet, a cool-state synthesis gas outlet, a waste water outlet, a cooling water inlet and a steam outlet are formed in the heat exchange device, and the thermal-state synthesis gas inlet is connected with the thermal-state synthesis gas outlet; a steam inlet, a steam exhaust outlet and an electric quantity outlet end are formed in the power generation device, and the steam inlet is connected with the steam outlet. With the adoption of the system and the method, harmlessness, reduction and recycling of sludge are realized.