The discovery of multiferroic behavior in monolayer NiI2 provides a new symmetry-broken state in van der Waals monolayers, featuring the simultaneous emergence of helimagnetic order and ferroelectric order at a critical temperature of T=21 K. However, the microscopic origin of multiferroic order in NiI2 monolayer has not been established, and in particular, the role of non-collinear magnetism and spin-orbit coupling in this compound remains an open problem. Here we reveal the origin of the two-dimensional multiferroicity in NiI2 using first-principles electronic structure methods. We show that the helimagnetic state appears as a consequence of the long-range magnetic exchange interactions, featuring sizable magnetic moments in the iodine atoms. We demonstrate that the electronic density reconstruction accounting for the ferroelectric order emerges from the interplay of non-collinear magnetism and spin-orbit coupling. We demonstrate that the ferroelectric order is controlled by the iodine spin-orbit coupling, and leads to an associated electronically-driven distortion in the lattice. Our results establish the microscopic origin of the multiferroic behavior in monolayer NiI2, putting forward the coexistence of helical magnetic order and ligand spin-orbit coupling as driving forces for multiferroic behavior in two-dimensional materials.