Nitrogen flow rate is one of the important growth parameters for the growth of group-III nitride nanowires in plasma-assisted molecular beam epitaxy. However, nitrogen flow rate has received less attention compared to the group-III metal fluxes since its effects are not as prominent as that of the metal fluxes. In this study, we investigated the effects of nitrogen flow rate on the morphology and composition of AlGaN nanowires. Reducing the nitrogen flow rate improved the structural uniformity and increased the Al composition. We present a composition change model and show that excess nitrogen suppresses Ga desorption by recombining the Ga atoms, thereby causing a change in the composition of AlGaN. It was confirmed that the influence of the nitrogen flow rate on the Al composition varied with the growth temperature. These results provide insights into the role of nitrogen flow rate on the growth of AlGaN nanowires and suggest that more sophisticated growth control is possible by considering the nitrogen flow rate.