A novel thin-film lithium-ion battery (LIB) which can be charged by the light irradiation was fabricated by molecular precursor method. The unprecedented, translucent thin-film LIB, fabricated on a fluorine-doped tin oxide pre-coated glass substrate, was attained by using the active materials, titania for anode and LiCoO2 for cathode, respectively. The averaged potential at 2.04[Formula: see text]V was observed by applying a constant current of 0.2[Formula: see text]mA. Then, that at 1.82[Formula: see text]V was detected after 60[Formula: see text]s during the sequential self-discharge process. The charging voltage of the assembled battery was 1.38[Formula: see text]V with irradiation of 1-sun, the self-discharge voltage was 1.37[Formula: see text]V. Based on the calibration curve of the charging voltages over constant currents ranging from 0–1.0[Formula: see text]mA, the detected value can be theoretically reduced to the charging operation by applying a constant current of approximately 60[Formula: see text][Formula: see text]A. The charge and discharge of this device was stable voltage at least 30 cycles. The two-in-one device can simultaneously generate and store electricity from solar light, the renewable energy source, and may be applied in smart windows for distributed power system according to on-site demand.