In this paper, 2-step bin packing algorithm for energy storage systems (ESS) charging/discharging dynamic scheduling is proposed. The proposed algorithm used the basic concept of bin packing problem (BPP) which is the optimization method to allocate items in bins. In 2-step bin packing, the size of item is transformed to different sizes by using the weighted function which reflects the chargeable capacity of ESS and electricity price at each time slot. In this algorithm, the item corresponds to energy block and bin corresponds to time slot. This function determines which bin is proper to place the items, even for physically the same size items. In the next steps, this algorithm finds a way to optimize the placement of all items by obtaining feedback through iterative execution. This paper included the result of six cases with based on real-world advanced metering infrastructure (AMI) data. Numerical results confirmed that the effectiveness of the proposed method to schedule the ESS charging/discharging and economic effect to operate the ESS system in smartgrid.