Rapid in situ detection of pathogens coupled with high resolution imaging in the distal human lung has the potential to provide new insights and diagnostic utility in patients in whom pneumonia is suspected. We have previously described an antimicrobial peptide (AMP) Ubiquicidin (fragment UBI29-41) labelled with an environmentally sensitive fluorophore that optically detected bacteria in vitro but not ex vivo. Here, we describe further chemical development of this compound and demonstrate that altering the secondary structure of the AMP to generate a tri-branched dendrimeric scaffold provides enhanced signal in vitro and ex vivo and consequently allows the rapid detection of pathogens in situ in an explanted human lung. This compound (NBD-UBIdend) demonstrates bacterial labelling specificity for a broad panel of pathogenic bacteria and Aspergillus fumigatus. NBD-UBIdend demonstrated high signal-to-noise fluorescence amplification upon target engagement, did not label host mammalian cells and was non-toxic and chemically robust within the inflamed biological environment. Intrapulmonary delivery of NBD-UBIdend, coupled with optical endomicroscopy demonstrated real-time, in situ detection of bacteria in explanted whole human Cystic Fibrosis lungs.