Chief Prosecutor of Palermo, he was assassinated by the Mafia on 6 August 1980 while browsing books on a stall located on a sidewalk in Via Cavour in Palermo, a few steps from his home. He was hit with three gunshots to his back by two killers on a motorcycle. The cause of that ruthless execution was the fact that he had personally signed the arrest orders against boss Rosario Spatola and some of his men while other colleagues of his refused to sign. The crime was ordered by the Mafia clan headed by Salvatore Inzerillo.
A substitute of him wrote that he was a man "of whom only death could be bought". At 19:30, on 6 August 1980, he bled to death on the sidewalk of Via Cavour in Palermo. Only a few magistrates attended his funeral. Although he was the only magistrate in Palermo to have a bullet proof car and an escort had been assigned to at the time, he did not use it as he felt that his protection would endanger others and that he was one of those who "had the duty to have courage". No one was convicted for his death even though the tribunal of Catania found the context identifying it in the grey area between business, politics and organized crime. His commitment was continued by Rocco Chinnici, then among the few who understood and shared his intentions and action. Chinnici would later be killed as well.
Gaetano Costa was as ardent fighter against the italian mafia Cosa Nostra and paid for it with his life.

