This paper develops a scalable dc reconfigurable battery pack (RBP) and the accompanying hierarchical balancing algorithm. The battery cells in the RBP are divided into several modules, and each module is equipped with a slave controller that is only responsible for a subset of cells. The system controller performs the closed-loop control and allocates the desired voltage steps into battery modules. The hierarchical algorithm significantly reduces communication and computation requirements for large-scale applications. Moreover, considering the second-harmonic current (SHC) widely existing in a single-phase dc/ac system, which may induce the aging of battery cells, the dc RBP is used to suppress the SHC for the first time without an additional central dc/dc converter. Due to the high output voltage quality and low-frequency operation of the dc RBP, the filter size can be significantly reduced and the efficiency of the system can be improved. Experimental validation of the proposed control scheme is presented using a dc RBP containing 48 3-Ah 18650 lithium-ion cells. Experimental results show that the proposed method can effectively balance battery cells and suppress the SHC.