During development of the central nervous system not all axons are myelinated, and axons may have distinct myelination patterns. Furthermore, the number of myelin sheaths formed by each oligodendrocyte is highly variable. However, our current knowledge about the axo-glia communication that regulates the formation of myelin sheaths spatially and temporally is limited. By using axon-mimicking microfibers and a zebrafish model system, we show that axonal ephrin-A1 inhibits myelination. Ephrin-A1 interacts with EphA4 to activate the ephexin1-RhoA-Rock-myosin 2 signaling cascade and causes inhibition of oligodendrocyte process extension. Both in myelinating co-cultures and in zebrafish larvae, activation of EphA4 decreases myelination, whereas myelination is increased by inhibition of EphA4 signaling at different levels of the pathway, or by receptor knockdown. Mechanistically, the enhanced myelination is a result of a higher number of myelin sheaths formed by each oligodendrocyte, not an increased number of mature cells. Thus, we have identified EphA4 and ephrin-A1 as novel negative regulators of myelination. Our data suggest that activation of an EphA4-RhoA pathway in oligodendrocytes by axonal ephrin-A1 inhibits stable axo-glia interaction required for generating a myelin sheath.