This work describes the final design and implementation of the electrical power system for ESTCube-1, a 1-unit CubeSat tasked with testing the electrostatic tether concept and associated technologies for the electric solar wind sail in polar low Earth orbit. The mission required an efficient and reliable power system to be designed that could efficiently handle highly variable power requirements and protect the satellite from damage caused by malfunctions in its individual subsystems, while using only commercial-off-the-shelf components. The system was developed from scratch and includes a novel redundant standalone nearly 90% efficient maximum power point tracking system, based on a commercially available integrated circuit, a lithiumion battery based fault-tolerant power storage solution, a highly controllable and monitorable power distribution system, capable of sustaining loads of up to 10 W, and an AVR microcontroller based control solution, heavily utilizing non-volatile ferroelectric random access memories. The electrical power system was finalized in January 2013 and was launched into orbit on 7th of May, 2013. In this paper, we describe the requirements for the subsystem, the design of the subsystem, pre-flight testing, and flight qualification.