He was born to Manuel Luis da Costa and Maria Joao da Costa in the small village of Casevel, Castro Verde.
From a small farm in the Alentejo, he travelled to Lisbon where he worked for his uncle, a member of the Associacao dos Empregados do Comercio de Lisboa (English: Association of Commerce Workers of Lisbon), and learned the alphabet in his shop.
On meeting Alfredo Luis, he was described as "...of a serious physiognomy, almost tragic" and with "big brown eyes, slow-moving, with a stance that appeared sleep-walking...with a moustache on his face, the nose lightly bent to the left. It is probable that he had untreated tubercolosis...and a perceptible bend in his back..." Later, Costa would continue as a sales clerk, after leaving the employ of his uncle, and traveling the country. Self-trained and a natural rebel, in Angra do Heroismo he worked for a labour newspaper for workers in commerce, where as an able journalist he continued to submit weekly dispatches. While in Angra, he was also the driving force behind the Nucleo da Juventude Anarco-Sindicalista (English: Center for Anarchist-Syndicalist Youth) He continued his career in 1903, in Estremoz, where he was a republican propagandist, contributing to local newspapers with an unlimited dedication. With a small loan from a colleague he founded a small bookstore, A Social Editora, with Aquilino Ribeiro, where he edited several pamphlets against the regime, and distributed them door-to-door. This included his A Filha do Jardineiro (English: The Gardener's Daughter) an ironic romance that desparged the royal family over seven decades, and which consumed most of his savings.
A republican radical, though not an extremist, he was a mason in the Lisbon Mountain Lodge with contemporaries such as Aquilino Ribeiro, Luz de Almeida and Machado Santos.
By January 31, 1908 he lived in the second-floor apartment at Rua dos Douradores, 20 in Lisbon. Costa was single, childless, an employee in commercial business, while collaborator in several publications and administrator of the weekly O Caixeiro.
On the disastrous evening of the Municipal Library Elevator Coup (January 28, 1908) Costa lead a group of 20 men (with Manuel Buica) to assault the Royal Palace of Necessidades, but modified their strategy and, instead, attacked the Quartel dos Loios. Later they confronted several members of the Guarda Municipal (English: Municipal Guard) near Rua de Santa Barbara when they were waiting for a mortar explosion to signal the main attack. Planned, financed and armed by elements of the Portuguese Republican and Progressive Dissidency Parties, the coup d'etat was to be carried out by members of the Carbonaria, Formiga Branca and masonry in order to proclaim a Republic and/or assassinate Prime Minister Joao Franco.
The coup failed when the police were tipped-off to the conspiracy and had reinforced strategic posts throughout the city. As several members of the Republican registry were rounded-up, Alfredo Costa was able to escape the police sweep, as he was not at his pre-designated post for the coup. In fact, the prisons were full of high-ranking members of the conspiracy who were easily picked up as they meandered through the city.
In the backroom of the Cafe Gelo, a popular and frequented destination of the Carbonaria and republicans was relatively empty. With a small group, that included Manuel Buica, Alfredo Costa continued to gather in the cafe, even as others silently or quickly passed by without entering. Actually, Costa continued to freely walk through the city, congregating with republican elements, while exhorting his peers to continue the struggle. During an encounter with Machado Santos and Soares Andrea at the Cafe Gelo, shortly after the attempted coupe, he affirmed:"If someone attempts to grab me...I will burn him to pieces"
This refrain was followed by a conspicuous patting of his coat, where he carried his Browning revolver.
On the morning of February 1908, Alfredo Costa met with Manuel Buica and other Carbonarias in the Quinta do Xexe, in Olivais, where they finalized the assassination of Joao Franco and members of the Royal Family. It is unclear when the decision was made to kill the King, but it was part of the instructions given to the cell that Alfredo Costa and Manuel Buica belonged to, during the Elevator coup attempt.
At about two in the afternoon, Manuel Buica and three others had lunch in a corner-table near the kitchen in the Cafe Gelo. The assassins talked quietly, as Alfredo Costa quickly ate his meal. Manuel Buica was the first to get up, and he advised his cohorts that he would go catch "the boat" (referring to his intent to meet the King's ferry as it arrived). By four o'clock, Alfredo Costa, Fabricio de Lemos and Ximenes, assumed positions under the arcade of the Minister of the Kingdom in the Terreiro do Paco. Manuel Buica with Domingos Ribeiro and Jose Maria Nunes, positioned themselves within the square, near the statue of D. Jose across from the Ministry, alongside a tree and kiosk. The six-man cell await along the planned route of the Royal Family, along with the rest of the gathered population, eyeing the arrival of the boat on which they travelled.
After the disembarking, around 5:20, Manuel Buica had begun firing on the landau. Alfredo Costa jumped on the carriage and fired two shots into the already lifeless body of the monarch: Buica had already killed the King with his first shot. The Queen confronted Costa with her bouquet of flowers, yelling: "Infames! Infames!" (English: Infamous). Costa turned to the Crown Prince and fired a shot that hit him in the chest, but being of a small calibre it did not penetrate the sternum, and the Prince opened fire on Costa, firing four rapid shots with his service revolver. Costa fell from the carriage; later, in the autopsy, it was learned that the shots fractured Costa's left humerus and although it was not fatal, it impeded him from holding onto the edge of the landau. A mounted cavalry officer, Lieutenant Figueira, then attacked Costa with his sabre, wounding him in the back and face. The municipal police then committed to the attack, and two agents apprehended him and dragged the assassin to the police quadrant near the city hall. At the entrance he was shot by an unidentified officer or member of the Municipal Guard, which perforated his lung, killing him.
Alfredo Costa was buried on February 11, 1908. The day before, a group of three men, members of the Associacao do Registo Civil (English: Civil Registry Association) who manifested outside the morgue in order to convince the director to provide a civil funeral.
Autopsied in the early evening of the same day, the coroner found a total of 11 wounds throughout his body. There were three wounds in his head, two on the back and one in the chest which were caused by a sword, but were not considered fatal. A seventh wound corresponded to a wound on the left side of his face. The rest of the wounds were caused by gunshots: one in the lower back, one straight through wound in the armpit and the humerus wound (both attributed to Prince Luis Fillipe) and finally, a wound caused by a bullet that hit him in the upper part of his chest and perforated his lung, crossed his thorax, fracturing and lodging itself in a rib. This last wound was fatal, and responsible for Costa's death. The projectile was not recovered, but from the description, was a small 5–10 mm bullet from a 6.35-7.65 calibre automatic, which was not in standard for the Portuguese police at that time. This reinforced a theory that was promulgated by conspiracy theorists: that Alfredo Costa was killed by people who did not wish the assassins to be interrogated.
Costa's body, along with that of Manuel Buica and Joao Sabino (an unfortunate victim of the chaos) were prepared and delivered (except for Sabino's body) to the cemetery of Alto de Sao Joao. Arriving, the coffins were sealed and buried (in markers 6044 e 6045); in 1914 the bones of the assassins were transferred to the mausoleum chamber 4251.
Ironically, the acclamation government of Ferreira do Amaral permitted public mourning by republicans, who had apologized for the assassinations and who considered the assassins friends of the Fatherland. Approximately 22,000 people would pay their respects at the graves of Costa and Buica; the civil ceremony was organized by the Civil Registry Association, which furnished the flowers and paid 500 reis per person and 200 reis per child that appeared at the graves. After the establishment of the Republic, the same Association acquired land in the cemetery in order to construct a monument to the heroic liberators of the Fatherland (as written on the request to the Lisbon city hall authorities in their petition). The monument was eventually dismantled by the Estado Novo government and the bodies transferred to other locations within the cemetery, and the monument's elements were abandoned.
The final report into the assassination of King Carlos and Crown Prince, which was ready for judicial investigation disappeared (on October 25, 1910), shortly after the proclamation of the First Portuguese Republic. Judge Almeida e Azevedo submitted the process to Dr. Jose Barbosa, member of the Provisional Government, who was responsible for delivering it to Afonso Costa, the new Minister of Justice.