Compaore, who is in exile, was tried and sentenced in absentia by a military tribunal sitting on Wednesday.
The former strongman was sentenced along with his then-security chief, Hyacinthe Kafando, who also received a life term.
The tribunal, which began last October, found the men "guilty of attack on state security, complicity in murder and concealment of a corpse."
Mariam Sankara sits in a courtroom where 14 people stand trial for her Sankara's death
Mariam Sankara has been vocal about getting justice for her late husband
Sankara's widow Mariam Sankara said she was "satisfied" with the verdict, although she "wished" Compaore and Kafando were present.
"It is not good that people kill other people and stop the process of development of a country without being punished," she told reporters.
Source: DW