Recent studies have demonstrated that the presence of belowground neighbours induces varied morphological and biochemical responses in plants. Plant allelopathic activity is elicited by the presence of competitor seedlings or competitor root exudates. However, it is unknown whether allelopathy also influences root recognition behaviour in weed-crop interaction. To assess barnyardgrass response to the presence of allelopathic rice roots, we conducted a greenhouse experiment of barnyardgrass-rice mixed culture, including barnyardgrass monoculture, barnyardgrass mixed with the allelopathic rice line PI312777 and barnyardgrass mixed with the nonallelopathic rice cultivar Liaojing-9. Our results showed that the presence of allelopathic rice roots enhanced root allocation and tissue density (RTD) of barnyardgrass, whereas it decreased root biomass, total root length, specific root length (SRL) and topological index (TI), compared to barnyardgrass grown in monoculture; moreover, there was a significant correlation of topological index with root foraging precision and competition. Therefore, the presence of allelopathic rice roots affected the barnyardgrass root morphology, nutrient foraging and competition, suggesting that allelopathy plays a key role in root recognition behaviour of barnyardgrass-rice competitive interaction.