The quantum Hall effect in two-dimensional electron gases involves the flow of topologically protected dissipationless charge currents along the edges of a sample. Integer or fractional electrical conductance is associated with edge currents of electrons or quasiparticles with fractional charges, respectively. It has been predicted that quantum Hall phenomena can also be created by edge currents with a fundamentally different origin: the fractionalization of quantum spins. However, such quantization has not yet been observed. Here we report the observation of this type of quantization of the Hall effect in an insulating two-dimensional quantum magnet1, α-RuCl3, with a dominant Kitaev interaction (a bond-dependent Ising-type interaction) on a two-dimensional honeycomb lattice2-7. We find that the application of a magnetic field parallel to the sample destroys long-range magnetic order, leading to a field-induced quantum-spin-liquid ground state with substantial entanglement of local spins8-12. In the low-temperature regime of this state, the two-dimensional thermal Hall conductance reaches a quantum plateau as a function of the applied magnetic field and has a quantization value that is exactly half of the two-dimensional thermal Hall conductance of the integer quantum Hall effect. This half-integer quantization of the thermal Hall conductance in a bulk material is a signature of topologically protected chiral edge currents of charge-neutral Majorana fermions (particles that are their own antiparticles), which have half the degrees of freedom of conventional fermions13-16. These results demonstrate the fractionalization of spins into itinerant Majorana fermions and Z2 fluxes, which is predicted to occur in Kitaev quantum spin liquids1,3. Above a critical magnetic field, the quantization disappears and the thermal Hall conductance goes to zero rapidly, indicating a topological quantum phase transition between the states with and without chiral Majorana edge modes. Emergent Majorana fermions in a quantum magnet are expected to have a great impact on strongly correlated quantum matter, opening up the possibility of topological quantum computing at relatively high temperatures.