According to the hydrogen-electricity co-production system and method for the coal-fired boiler, the coal-fired boiler, sulfur-iodine circulating hydrogen production and supercritical carbon dioxide power generation are coupled, and hydrogen-electricity co-production is carried out; comprising a coal-fired carbon dioxide boiler, a carbon dioxide power generation system, a high-temperature heat exchanger, a medium-temperature heat exchanger, a denitration module, a low-temperature heat exchanger, an air pre-heater, a dust remover, an induced draft fan, a biochemical reactor, a flue gas emission system, a separation system, a hydrogen iodide solution concentration and rectification system, a hydrogen iodide decomposition system, an iodine recovery system, a hydrogen storage system and a sulfuric acid storage system. An air supply system, an air powder system and a water supply system. According to the method, the iodine solution is used for absorbing sulfur dioxide in the boiler flue gas, no extra carbon dioxide emission is generated, iodine can be recycled, and the operation cost is low; the polluting gas sulfur dioxide generated by the boiler is used for producing hydrogen, so that the pollution is reduced, and the energy is increased; the supercritical carbon dioxide power generation work is in the highest efficiency temperature section, and the power generation efficiency is improved.