Recently, the research on sixth generation (6G) network systems has started as the deployments of fifth generation (5G) network systems go with a swing. One research aspect is the operation cost of 6G data centers because the energy consumption of the data centers has become a major portion of data centers’ operation cost as the request on 6G services gradually increases. Optimizing the energy consumption for lowering operating cost of data centers gains a lot of attention by the data center operators and becomes a hot issue of the current and future data center’s research. Most of the efforts in related studies have been made to minimize the operation cost from cooling, servers, and electricity aspects. However, most of the existing research studies address above operation cost issue in a separate manner which leads to inferior optimization results. Effective joint solutions are eagerly sought to optimize the operation cost of data centers. In this paper, a scheme of operation cost optimization is proposed for distributed data centers. Under the guide of the proposed scheme, electricity cost is optimized by taking into account of the multiple input single output (MISO) server power model, electricity price, and cooling efficiency. The workload distribution affecting the electricity cost as a major factor is studied and the optimal value of allocated workload is found to reduce the electricity cost. First, the whole system model is introduced. Next, based on the system model, the problem of cost optimization via workload dispatching is constructed without compromising service delay guarantee in service level agreement (SLA). Moreover, in order to conveniently solve the optimization problem, an algorithm is presented. Evaluation results demonstrate that the proposed scheme outperforms the existing scheme in terms of the total electricity cost reduction.