Only 215 deputies voted in support of the measure, which required 226 votes to pass.
Under Ukrainian law, parliament must review each year whether to allow foreign troops on Ukrainian soil.
President Viktor Yushchenko's pro-Western policies and his call for NATO membership have become issues ahead of parliamentary elections due on 26 March. Critics say closer ties with NATO would damage Ukraine's relations with Moscow and hurt its defense industry, which is still closely aligned with Russia.
Ukraine last year hosted a major NATO anti-terror exercise, as well as a multinational Black Sea exercise that included some 1,200 U.S. Marines. The government has highlighted these exercises as an example of Ukraine's integration with the West.