The distribution network is generally unbalanced due to the distribution of consumers in different phases and the different status of their energy consumption. Also, in recent years, the utilization of distributed generations (DGs) has flourished in the distribution network, thanks to their favorable operational and environmental benefits. Therefore, it is predicted that the optimal energy management of DGs in the unbalanced distribution network can improve the operation state of the network. Moreover, the consumer load model is generally a combination of constant impedance, constant current, and constant power conditions. Therefore, the current study focuses on the analysis of the operation of unbalanced four-wire distribution systems containing DGs, in which load models are also involved. An optimization structure is established to make the voltage deviation, power loss, neutral wire loss, and voltage unbalance minimized. Limitations of the problem include those related to the network and those concerning operating indices of the system like voltage magnitude and phase angle of buses, power flow through the distribution lines, constraints of operation of DGs, load model, and unbalanced conditions. The problem formed in this study is nonlinear and is solved using sequential quadratic programming (SQP) by implementing it in the GAMS simulation environment. To test the benefits of the introduced approach, a 13-bus distribution system has been adopted so that the optimal operation of DGs in the distribution network has been able to reduce the unbalanced situation of the network compared to the power flow studies. Also, this scheme has improved the operation of network, where energy losses and voltage drop have been reduced compared to power flow studies, and a smooth voltage profile has been extracted.