Despite substantial research examining caterpillar-plant interactions, changes in the feeding behaviour of lepidopteran larvae as they develop are poorly understood. In this study, we investigated ontogenetic changes in the behaviour of Helicoverpa armigera larvae feeding on reproductive structures of pigeonpea (Cajanus cajan). Specifically, we examined the preference for and avoidance of pigeonpea flowers and pods of first, second, third, and fourth instar H. armigera larvae. We also conducted a no-choice assay to compare the ability of third and fourth instar larvae to penetrate pigeonpea pod walls, which act as a physical defence against herbivory. When presented with a choice between pigeonpea pods and flowers, different instars behaved differently. First and second instar larvae largely avoided pigeonpea pods, instead feeding on flowers; third instar larvae initially avoided pods, but by 24 h, did not strongly discriminate between the structures; and fourth instars demonstrated a preference for pods. When initially placed on pods, first instars were slower than other instars to leave these structures, despite pods being suboptimal feeding sites for small caterpillars. We identified a clear instar-specific ability to penetrate through the pod wall to reach the seeds. Most third instar larvae were unable to penetrate the pod wall, whereas most fourth instars succeeded. Third instars suffered a physiological cost (measured by relative growth rate) when boring through the pod wall, which was not observed in fourth instars. Our study further illuminates the insect-plant interactions of the H. armigera-pigeonpea system and provides evidence for the significant changes in feeding behaviour that may occur during lepidopteran larval development.