From Old Japanese. First attested in the Nihon Shoki of 720 CE.
The initial m sound was apparently emphasized, possibly similar to *mma, becoming then uma or muma, via processes also seen in the word 梅 (ume, mume, “plum”). However, Pellard simply reconstructs Proto-Japonic *uma and treats the mentioned processes as secondary.
The ma sound denoting "horse" is common to a number of languages of central Asia, where horses were first domesticated, which has led some to speculate about a possible cognate root (but no consensus on any kind of relation exists). Compare Manchu ᠮᠣᡵᡳᠨ (morin, “horse”), Mongolian морь (morʹ, “horse”), Korean 말 (mal, “horse”), Mandarin 馬 /马 (mǎ, “horse”), and Proto-Indo-European *márkos (“horse”) and descendants such as Irish marc (“horse”, archaic) or English mare (“female horse”). More at *márkos.