Bacterial wilt caused by Ralstonia solanacearum is a serious disease of peanut (Arachis hypogaea) in China. However, the molecular basis of peanut resistance to R. solanacearum is poorly understood. Arachis duranensis, a wild diploid species of the genus Arachis, has been proven to be resistant to bacterial wilt, and thus holds valuable potential for understanding the mechanism of resistance to bacterial wilt and genetic improvement of peanut disease resistance. Here, suppression subtractive hybridization (SSH) and macroarray hybridization were employed to detect differentially expressed genes (DEGs) in the roots of A. duranensis after R. solanacearum inoculation. A total of 317 unique genes were obtained, 265 of which had homologues and functional annotations. KEGG analysis revealed that a large proportion of these unigenes are mainly involved in the biosynthesis of phytoalexins, particularly in the biosynthetic pathways of terpenoids and flavonoids. Subsequent real-time polymerase chain reaction (PCR) analysis showed that the terpenoid and flavonoid synthesis-related genes showed higher expression levels in a resistant genotype of A. duranensis than in a susceptible genotype, indicating that the terpenoids and flavonoids probably played a fundamental role in the resistance of A. duranensis to R. solanacearum. This study provides an overview of the gene expression profile in the roots of wild Arachis species in response to R. solanacearum infection. Moreover, the related candidate genes are also valuable for the further study of the molecular mechanisms of resistance to R. solanacearum.