Here, we report a spatiotemporal on-demand patch (SOP) that integrates drug-loaded microneedles with biocompatible metallic membranes to enable electrically triggered active control of drug release. Furthermore, the dynamic and unpredictable disease progression demands a pharmaceutical treatment that can be actively controlled in real-time to ensure medical precision and personalization. However, user adherence to long-term repetitive drug delivery poses a grand challenge. Transdermal drug delivery is of vital importance for medical treatments.