CRISPR/Cas9 is a powerful genome editing system but uncontrolled Cas9 nuclease expression triggers off-target effects and even in vivo immune responses. Inspired by synthetic biology, here we built a synthetic switch that self-regulates Cas9 expression not only in the transcription step by guide RNA-aided self-cleavage of cas9 gene, but also in the translation step by L7Ae:K-turn repression system. We showed that the synthetic switch enabled simultaneous transcriptional and translational repression, hence stringently attenuating the Cas9 expression. The restricted Cas9 expression induced high efficiency on-target indel mutation while minimizing the off-target effects. Furthermore, we unveiled the correlation between Cas9 expression kinetics and on-target/off-target mutagenesis. The synthetic switch conferred detectable Cas9 expression and concomitant high frequency on-target mutagenesis at as early as 6 h, and restricted the Cas9 expression and off-target effects to minimal levels through 72 h. The synthetic switch is compact enough to be incorporated into viral vectors for self-regulation of Cas9 expression, thereby providing a novel 'hit and run' strategy for in vivo genome editing.