A system and method generates electricity and co-produces a hydrogen flow from coal. The electricity is generated by a turbine with a topping combustor and a solid oxide fuel cell ("SOFC") reacting syngas. The syngas is produced in a coal gasifier with a portion of the compressed air from the turbine, coal, and steam. Prior to the syngas being delivered to the topping combustor and the SOFC, it is cleaned and a portion of the hydrogen in the syngas is removed to form the hydrogen flow. Additionally, a vitiated air flow from the SOFC is directed to the topping combustor and another portion of the compressed air from the turbine directed to the SOFC after it is heated with the turbine exhaust. An aspect of the invention varies the amount of electricity generated and the volume of hydrogen co-produced based upon the demand of electricity and/or the demand of said hydrogen.