Traditionally, scholars believe that formal defense alliance increases foreign aid allocation. However, this paper finds since the 1970s, OECD donors have been increasing their development assistance to non-allies, and by mid-2000s, the average amount of aid allocated to non-allies has surpassed that of allies. What explains this changing pattern of alliance and foreign aid allocation? This paper argues that alliance's impact on foreign aid is conditional on the global security environment, defined as the sum of hostility and insecurity between all states in the system. When the security environment is competitive, donors need to provide aid to allies to strengthen the alliance and support friendly regimes. When the security environment is favorable, donors could use alliance membership as an incentive to solicit policy concessions from aspiring members. Alliance can save donors' budgets through attraction and substitution mechanisms. This paper contributes to the debate on the cost of alliances by showing that alliances can reduce the financial burden of the leading state. Additionally, this paper theorizes changes in foreign aid policies by incorporating the system as a moderating variable. It will test the hypothesis with two-way fixed effect models and various robustness checks using foreign aid data from 1960 to 2013.