A facile fabrication of high-performance flexible all-solid-state carbon micro-supercapacitors (MSCs) with highly improved energy and power densities is demonstrated by laser direct writing on polyimide films using a 405nm blue–violet semiconductor laser in an Ar atmosphere. The capacitive performance was significantly improved by changing the laser irradiation atmosphere from air to an inert atmosphere of Ar gas. The improvements were attributed to a better conductivity, larger surface area, and a narrower pore distribution of the carbon electrodes fabricated in Ar. The MSC performance can be further improved by air-plasma treatment which improves the interfacial contact between the carbon structures and the electrolyte. Moreover, the MSCs showed excellent cycling stability, good flexibility, and the capability of operating at high energies and voltages when connecting MSCs in series or parallel arrangements. The MSCs can act as energy storage units and stabilizers in self-powered systems in combination with commercial solar panels. Furthermore, an on-chip self-powered UV-light detection system with a high on/off ratio and fast response was demonstrated by combining a commercial solar panel with an in-plane integrated circuit comprising an MSC and a ZnO nanoparticles-based photodetector prepared by a one-step laser direct writing process.