Transpeptidation of surface proteins catalyzed by the transpeptidase sortase plays a critical role in the infection process of Gram-positive pathogen, and probing sortase activity and screening its inhibitors are of great significance to fundamental biological research and pharmaceutical development, especially novel antivirulence drug design. Herein, we developed a novel fluorescent biosensor to detect sortase activity based on a transpeptidation-triggered assembly of tripartite split green fluorescent protein (split GFP). Peptide P, composed the 10th β-sheet of GFP (GFP10) and the sortase A (SrtA) recognition sequence (LPETX), and peptide P, the 11th β-sheet of GFP (GFP11) with oligoglycine at N-terminal, were designed and synthesized, respectively. Existence of SrtA enables P and P to ligate into one peptide, which could spontaneously bind to GFP1-9 (the 1st to 9th β-sheets of GFP) and assemble into functional GFP. Thus, the sortase-catalyzed transpeptidation can switch on the fluorescence signal of GFP. The method was successfully applied to detect SrtA activity with a low detection limit of 0.16 nM and for its inhibition measurement. Moreover, the feasibility of the proposed assay was further expanded to detect SrtA in human blood and further Gram-positive pathogens analysis in frozen food. Our method, using tripartite split GFP as a readout, is facile, label-free, and sensitive and exhibits great potential as a promising platform for sortase detection and inhibitor screening.