The radio advert featured a voiceover saying that ripen at home avocados will be “hard as rock for the first 18 days, three hours and 20 minutes, then they'll be ready to eat, for about 10 minutes, then they'll go off”.
It then suggested people buy a bacon roll or egg muffin from Costa as a better breakfast option.
Two people complained that the advert discouraged the selection of fresh fruit.
Costa, which was bought by Coca Cola for £3.9bn in August, says its advert focused on the “frustration and unpredictability of the avocado” and it was not suggesting listeners make a “definitive choice”.
But the Advertising Standards Authority (ASA) agreed the advert breached its code by contrasting the “negative aspects of avocados” with “positive language” used to describe Costa’s breakfast items.
The ASA says: “We considered that, although the ad was light-hearted, it nevertheless suggested avocados were a poor breakfast choice, and that a bacon roll or egg muffin would be a better alternative, and in doing so discouraged the selection of avocados.
“In light of the above, we concluded that the ad discouraged the selection of fresh fruit and therefore breached the Code.”
The ASA told Costa to ensure future adverts did not “condone or encourage poor nutritional habits”.