The court set aside the elections saying they were held without following the National Sports Code.
It also directed that fresh elections be conducted within a period of five months.
A bench of justices S Ravindra Bhat and Najmi Waziri also appointed former chief election commissioner (CEC) S Y Quraishi as an administrator to look into the functioning of the AIFF.
The court's order came on a plea by advocate Rahul Mehra contending that the elections of the federation were held contrary to the National Sports Code.