The cloud computing paradigm provides services to users in an on-demand fashion using high-speed Internet. This Internet-based computing paradigm provides resources on a rent basis without any fault. Virtual machine resource allocation is one of the challenging concerns in a cloud computing environment. The existing static, dynamic, and Meta-Heuristic approaches provide the solution to the virtual machine allocation problem. These techniques stuck with the local optimal solution. The slow convergence rate leads to the optimal solution locally and fails to provide the optimal solution Globally. This manuscript proposes a hybrid Spotted Hyena optimizer and artificial neural network, named the SHO-ANN technique, to provide a solution to the virtual machine assignment problem. The presented hybrid technique is evaluated and analyzed using performance metrics “Energy Consumption (Kwh) (8.54%), Host Utilization (24.8%), Average Execution Time(ms) (26.33%), SLA Violations (1.33%), and Number of Migrations (Counts) (19.73%)”. The spotted hyena optimizer is used to provide the vast data set to the ANN model for better accuracy. The hybrid approach provides an optimal solution globally with high convergence. The experimental results exhibit that the SHO-ANN outperforms the IqMc, SHO, and Genetic approaches using real workload scenarios and fabricated scenarios.