A universal gain-of-function approach for selective and temporal control of protein activity in living systems is crucial to understanding dynamic cellular processes. Here we report development of a computationally aided and genetically encoded proximal decaging (hereafter, CAGE-prox) strategy that enables time-resolved activation of a broad range of proteins in living cells and mice. Temporal blockage of protein activity was computationally designed and realized by genetic incorporation of a photo-caged amino acid in proximity to the functional site of the protein, which can be rapidly removed upon decaging, resulting in protein re-activation. We demonstrate the wide applicability of our method on diverse protein families, which enabled orthogonal tuning of cell signalling and immune responses, temporal profiling of proteolytic substrates upon caspase activation as well as the development of protein-based pro-drug therapy. We envision that CAGE-prox will open opportunities for the gain-of-function study of proteins and dynamic biological processes with high precision and temporal resolution.