Before the Great Oxygenation Event, where was the oxygen?
the great oxygenation event was caused by the evolution of photosynthesis, photosynthesis turns CO2 and water in to sugar and oxygen. so the oxygen came from CO2 and water. 

keep in mind CO2 levels were many many times higher (~20X) than today. Hydrogen was not released it was combined with carbon and oxygen to make sugars