Prosecutors pushed for his conviction, despite his legal team saying last week that a deal had been reached with the generals to drop the case.
A rights group said he had been sentenced after an "absurd process".
Rafael Marques de Morais is a long-standing critic of President Jose Eduardo dos Santos' 35-year rule.
He spent 43 days in prison, including 11 in solitary confinement, in 1999 after he published the article, The Lipstick of the Dictatorship, in a private Angolan newspaper.
The latest case against Mr Morais came after he wrote a book, Blood Diamonds: Torture and Corruption in Angola.
He accused seven generals of being linked to murder, torture and land grabs in Angola's lucrative diamond fields.
The generals denied the allegation, and sued Mr Morais.
Last week, his legal team said he had agreed not to republish the book, in exchange for the charges being dropped.
Campaign group Index on Censorship said on its website that it was "appalled to hear that Rafael has been sentenced after an absurd process".
"This is a clear violation of rights to free expression, to a free press and to a fair trial," its chief executive Jodie Ginsberg said.
In March, Index on Censorship gave Mr Morais a freedom of expression award for his work as a journalist and human rights activist in Angola.
A renowned Angolan journalist has been given a six-month suspended jail sentence for falsely linking military generals to the "blood diamond" trade.