The heavy occupancy of transposons in the genome implies that existing organisms have survived from multiple, independent rounds of transposon invasions. However, how and which host cell types survive the initial wave of transposon invasion remain unclear. We show that the germline stem cells can initiate a robust adaptive response that rapidly endogenizes invading P element transposons by activating the DNA damage checkpoint and piRNA production. We find that temperature modulates the P element activity in germline stem cells, establishing a powerful tool to trigger transposon hyper-activation. Facing vigorous invasion, Drosophila first shut down oogenesis and induce selective apoptosis. Interestingly, a robust adaptive response occurs in ovarian stem cells through activation of the DNA damage checkpoint. Within 4 days, the hosts amplify P element-silencing piRNAs, repair DNA damage, subdue the transposon, and reinitiate oogenesis. We propose that this robust adaptive response can bestow upon organisms the ability to survive recurrent transposon invasions throughout evolution.