The emergence of antimicrobial-resistant bacteria is an increasingly serious threat to global health, necessitating the development of innovative antimicrobials. Here we report the development of a series of CRISPR-Cas13a-based antibacterial nucleocapsids, termed CapsidCas13a(s), capable of sequence-specific killing of carbapenem-resistant Escherichia coli and methicillin-resistant Staphylococcus aureus by recognizing corresponding antimicrobial resistance genes. CapsidCas13a constructs are generated by packaging programmed CRISPR-Cas13a into a bacteriophage capsid to target antimicrobial resistance genes. Contrary to Cas9-based antimicrobials that lack bacterial killing capacity when the target genes are located on a plasmid, the CapsidCas13a(s) exhibit strong bacterial killing activities upon recognizing target genes regardless of their location. Moreover, we also demonstrate that the CapsidCas13a(s) can be applied to detect bacterial genes through gene-specific depletion of bacteria without employing nucleic acid manipulation and optical visualization devices. Our data underscore the potential of CapsidCas13a(s) as both therapeutic agents against antimicrobial-resistant bacteria and nonchemical agents for detection of bacterial genes.