He is the son of Antônio Valentim da Costa Magalhães and Maria Custódia Alves Meira.
He went to study law in São Paulo, and there began his life as a writer, bohemian and journalist.
Simultaneously, Magalahaes continued his own writing in a variety of genres, spanning fiction, non-fiction, poetry and theatre.
The library of the Brazilian Academy of Letters began its collection with the donation, in January 1897, by Magalhães, of a copy of his novel Flor de Sangue.
Magalhães himself was the first occupant of Chair 7 of the Academy, to which he was eventually succeeded by Euclides da Cunha.