Functional screening of expression libraries in vivo would offer the possibility of identifying novel biotherapeutics without a priori knowledge of their biochemical function. Here we describe a procedure for the functional selection of tissue-protective factors based on the in vivo delivery of arrayed cDNA libraries from the mouse secretome using adeno-associated virus (AAV) vectors. Application of this technique, which we call FunSel, in the context of acute ischaemia, revealed that the peptide ghrelin protects skeletal muscle and heart from ischaemic damage. When delivered to the heart using an AAV9 vector, ghrelin markedly reduces infarct size and preserves cardiac function over time. This protective activity associates with the capacity of ghrelin to sustain autophagy and remove dysfunctional mitochondria after myocardial infarction. Our findings describe an innovative tool to identify biological therapeutics and reveal a novel role of ghrelin as an inducer of myoprotective autophagy.