His father Francesco and her mother Angela Solari, of Genoese origin, soon discovered his musical talent, addressing it to study the flute at age eight and enrolling him to 10 years at the Milan Conservatory, where he remained until autumn 1861. The 'year later was enrolled as a student for a fee at the Conservatory of Naples directed by Saverio Mercadante where he reached excellent results, only fifteen years old, he won a competition for a place in the class of counterpoint and composition.
The October 14, 1867 fled from the conservatory to fight alongside of Garibaldi in the campaign for the liberation of Rome but was wounded and taken prisoner. On November 5, he returned to the Conservatory of Naples and shortly after he moved to Milan where he continued his musical studies.
In 1871 he composed his first opera, "Davide Rizio", libretto by Enrico Costa, countryman and cousin of Canepa. The opera in three acts, based on the life of David Rizzio and Mary Stuart, was performed for the first time at the Teatro Carcano in November of the following year and then bought by the publisher Lucca, who took her on stage in many Italian cities and Barcelona.
In 1874 he composed "I Pezzenti" with libretto by Fulvio Fulgonio which was staged at La Scala in September of that year and then in several European theaters.
Canepa was establishing itself more and more, and his third opera, "Riccardo III", composed to a libretto by Fulvio Fulgonio and staged for the first time in 1879, received unanimous praise from critics and other celebrated composers, like Giuseppe Verdi and Amilcare Ponchielli.
A serious illness interrupted his career and forced him to retreat to his native city, where he devoted himself to music criticism and teaching. In 1891 he ran for municipal elections is supported by young intellectuals who had recently founded La Nuova Sardegna is the unitary list of Republicans and moderate and, elected with broad suffrage, held for years the city councilor activities.
Improving his health returned to composing but his celebrity was now gone. In this period he wrote a Mass, a funeral march for Giuseppe Garibaldi and funeral elegy for Nino Bixio, performed in Genoa arrival of his ashes.
He ended his career as a composer with the operetta tragicomic "Amsicora", composed to a libretto by Salvatore Scano and staged at the Teatro Verdi in Sassari in April 1903.
To him they are named the Conservatory of Music of Sassari, the town band, a street of the same city and the Chorale Luigi Canepa, the oldest choral institution of Sardinia.
He is buried, along with his mother and his son Aldo Canepa, in the Monumental Cemetery of Sassari.