The advert, published in national newspapers, included a photograph of a donkey, an Afghani man and a British soldier. Its headline read "Saving her life means his just got easier".
The advert claimed helping donkeys in Afghanistan could win over the "hearts and minds" of local families, which would benefit British troops involved in the conflict.
The ASA received two complaints about the advert. Its report on the complaints says Spana was unable to prove that there was a direct correlation between its work and the lives of British servicemen and women serving in Afghanistan. It concludes that the advert must not appear again in its current form.
In response to the complaints, the charity said it had worked with the Royal Army Veterinary Corps in 2009 to treat livestock belonging to rural farmers in Afghanistan’s Helmand province.
Jeremy Hulme, chief executive of Spana, said: "We’re disappointed with the ruling, especially as we thought the fact that the British army approached Spana to assist with their operation in the first place would demonstrate that we were supporting the work of our troops.
"However, we do accept that the ASA finds it hard to see any direct link between our work in Afghanistan and any trends in the conditions of our troops as there are so many contributing factors.
"We can confirm that the advertisements will be changed in accordance with the ruling."