Abstract It is significantly important to predict remaining useful life (RUL) of organic electrochemical transistors (OECTs) for next-generation offshore electronics with stable and reliable performance. Most existing RUL prediction models are not suitable for OECT RUL prediction tasks as they are based on the premise that components have the same aging conditions. In fact, aging conditions of different OECTs often exist discrepancy, leading to performance degradation of RUL prediction models. Although a few methods addressed this issue via transfer learning methods, they still suffer from the challenge in terms of an obvious discrepancy of aging data distribution caused by different aging conditions. To address this issue, we developed a novel universal RUL prediction model for OECTs, called adaptive transformer-based network (ATFN), to reduce the obvious discrepancy among different aging data. First, a transformer-based feature extractor is used to capture the temporal and spatial aging features from some aging precursors. Then, a multi-scale feature alignment metric is adopted to align the aging features of OECTs by reducing discrepancy at different feature scales. Last, an adversarial manner is developed to obtain aging-condition-invariant features for further feature alignment. Extensive experiments are conducted on a real-world OECTs cycling stability aging tests dataset. The average MSE of our method is reduced by two orders of magnitude compared to the one of baseline, which indicates that our method achieves great progress for universal RUL prediction of OECTs under different aging conditions.