Earth observation satellites repeatedly charge and discharge their batteries in harsh environments, where sunlight illumination and shade occur repetitively; thus, battery power deteriorates rapidly. In this study, variable speed control moment gyro (VSCMG) / integrated power and attitude control system (IPACS), which has both an attitude control function and an energy storage function, was used for a lithium-ion battery and a hybrid. We propose a control law that suppresses the chemical deterioration factor of the battery while achieving attitude control by cooperatively charging and discharging the required power. The proposed method calculates the commands of VSCMG/IPACS and the power distribution ratio of the battery and VSCMG/IPACS at the same time, for power distribution that accounts for the reference torque. The proposed method considers the torque error, the wheel angular velocity variation, and the wheel angular acceleration variation, to ensure attitude control performance. In addition, to suppress the deterioration factor of the battery, an evaluation function considering the SOC and C rate of the battery is designed. While constraints on the output power, motor, and battery are satisfied, we obtain the optimal solution that minimizes the evaluation function. Using the above algorithm, the proposed method can yield optimal power distribution and commands of VSCMG/IPACS.