It actually confirmed an idea that had been germinating in his mind since he was a teenager. Einstein took the Michleson and Morley experiment at face value. He made two assumptions about the Universe and proceeded to use these assumptions to completely rebuild physics. The first assumption is not too tricky. The aether was postulated to explain something that really didn't need explaining.
Light is an oscillation of magnetic and electric fields.
That's what the wave is, not a vibration in a medium. The second assumption, however, is against all common sense. This assumption violates common sense but has since been tested with equipment of such accuracy that if it wasn't valid, the discrepancy would have shown up. The first assumption actually means that you cannot measure absolute speed. Speed is relative.