Abstract Background Anti-microbial peptides (AMPs), naturally encoded by genes and generally containing 12â 100 amino acids, are crucial components of the innate immune system and can protect the host from various pathogenic bacteria and viruses. In recent years, the widespread use of antibiotics has resulted in the rapid growth of antibiotic-resistant microorganisms that often induce critical infection and pathogenesis. Recently, the advent of high-throughput technologies has led molecular biology into a data surge in both the amount and scope of data. For instance, next-generation sequencing technology has been applied to generate large-scale sequencing reads from foods, water, soil, air, and specimens to identify microbiota and their functions based on metagenomics and metatranscriptomics, respectively. In addition, oolong tea is partially fermented and is the most widely produced tea in Taiwan. Many studies have shown the benefits of oolong tea in inhibiting obesity, reducing dental plaque deposition, antagonizing allergic immune responses, and alleviating the effects of aging. However, the microbes and their functions present in oolong tea remain unknown. Results To understand the relationship between Taiwanese oolong teas and bacterial communities, we designed a novel bioinformatics scheme to identify AMPs and their functional types based on metagenomics and metatranscriptomic analysis of high-throughput transcriptome data. Four types of oolong teas (Dayuling tea, Alishan tea, Jinxuan tea, and Oriental Beauty tea) were subjected to 16S ribosomal DNA and total RNA extraction and sequencing. Metagenomics analysis results revealed that Oriental Beauty tea exhibited greater bacterial diversity than other teas. The most common bacterial families across all tea types were Bacteroidaceae (21.7%), Veillonellaceae (22%), and Fusobacteriaceae (12.3%). Metatranscriptomics analysis results revealed that the dominant bacteria species across all tea types were Escherichia coli, Bacillus subtilis, and Chryseobacterium sp. StRB126, which were subjected to further functional analysis. A total of 8194 (6.5%), 26,220 (6.1%), 5703 (5.8%), and 106,183 (7.8%) reads could be mapped to AMPs. Conclusion We found that the distribution of anti-gram-positive and anti-gram-negative AMPs is highly correlated with the distribution of gram-positive and gram-negative bacteria in Taiwanese oolong tea samples.