Manipulation of light-induced magnetization has become a fundamentally hot topic with a potentially high impact for atom trapping, confocal and magnetic resonance microscopy, and data storage. However, the control of the magnetization orientation mainly relies on the direct methods composed of amplitude, phase and polarization modulations of the incident light under the tight focusing condition, leaving arbitrary three-dimensional (3D) magnetization orientation completely inaccessible. Here, we propose a facile approach called machine learning inverse design to achieve expected vectorial magnetization orientation. This pathway is timeefficient and accurate to produce the demanded incident beam for arbitrary prescribed 3D magnetization orientation. We are confident to believe that the machine learning method is not only applied for magnetization orientations, but also widely used in the control of magnetization structures.