A method for producing hydrogen by thermochemical splitting of water includes injecting one or more feed streams of water into a reaction chamber. The method further includes using heat from a subterranean heat source to carry out the thermochemical splitting of water to form hydrogen and oxygen in the reaction chamber. The formed products are subsequently removed from the reaction chamber.