A court in the Libyan city of Misrata found Ahmed Ibrahim guilty of undermining national security and plotting to kill civilians.
A judge said Ibrahim urged residents in the town of Sirte to fight the rebels, according to AP news agency.
He was condemned to execution by firing squad.
It is the first known death sentence given to a member of the former government's inner-circle, the BBC's Rana Jawad reports from Tripoli.
Ibrahim was captured in Gaddafi's hometown of Sirte and is a distant relative of the former leader, our correspondent says.
He served as minister of education and information in the 1980s and Libyans know him as the man who banned the English language from school curricula for a decade, she adds.
Ibrahim was also a high-ranking member of the much feared "revolutionary committees" - groups of regime loyalists who enforced Gaddafi's power.
During the 2011 uprising that toppled the government, he was head of a centre that studied the former leader's Green Book, an ideological ruling manifesto loosely based on socialism.
Reports say Wednesday's ruling by a criminal court in Misrata must be confirmed by Libya's supreme court.
Libyan authorities are keen to see Gaddafi's family and loyalists punished for their support of his 42-year rule, but human rights activists have raised concerns about whether legal proceedings meet international standards.
The most senior regime member yet to face justice is Gaddafi's son, Saif al-Islam Gaddafi, who is due to go on trial in August.
A former minister in the government of Muammar Gaddafi has been sentenced to death for his role in repressing protests in the 2011 rebellion.