The distribution company (DISCO) determines optimal retail prices to operate the distribution network efficiently while promoting demand response (DR) programs. In addition, an energy storage system (ESS), which improves peak load management, is widely used for price-based DR. This paper proposes an electricity retail pricing strategy that considers the optimal operation of an ESS using a machine learning algorithm. An artificial neural network (ANN) is used to develop a practical model of the DR scheduling of an ESS. This model is trained using historical data that include the electricity price and the corresponding optimal demand obtained from the building energy management system. The proposed model is replicated using mathematical equations and directly integrated into the constraints of the retail pricing optimization problem of the distribution management system. The proposed ANN-based DR model of the ESS allows the development of an optimal pricing strategy with a single-level structure while reflecting the decision-making process of both the DISCO and the building operator. The proposed ANN-based DR model is verified through case studies, which prove that the model successfully expresses the price-optimal demand function and has high practical applicability. The results of the retail pricing demonstrate that the proposed strategy can accurately determine the balancing points while reducing the peak load.