Ruth Kamande, who won a prison beauty pageant while awaiting trial, slashed her partner Farid Mohammed, 24, to death in 2015 and was convicted in May.
"I want young people to know that it is not cool to kill your boyfriend or girlfriend even where you feel disappointed or frustrated don't do it," said High Court judge Jessie Lesiit passing sentence on Thursday.
"Instead, it is cool to walk away and thereafter to forgive."
The judge accused Kamande of "manipulative" behaviour that included accessing the victim's mobile phone as well as showing no remorse for the vicious attack which left "blood all over" the crime scene.
"I think passing any other sentence than the one prescribed (death) would turn the accused into a hero," said Lesiit.
Rights group Amnesty International called the sentence "cruel, inhumane and outdated".
Over three dozen murder cases traced: police
"This sentence is a blow to Kenya's progressive record in commuting death sentences to terms of imprisonment," said Amnesty director Irungu Houghton.
The victim's family insisted the sentence matched the crime.
"We're glad that this day came and his grandparents, his sister were actually in court today when this verdict was given," the victim's tearful aunt Emmah Wanjiku told reporters after the sentencing.
"He had just started his job when his life was cut short."
Five Kenyan police killed in roadside bombing
Kamande's lawyer Joyner Okonjo said she would appeal the sentence.
Kenya has an effective ban on carrying out death sentences and no death row prisoner has been executed since 1987.
The country's Supreme Court ruled in December 2017 that the mandatory death sentence for murder and armed robbery was unconstitutional, according to the Death Penalty Information Center.
The death sentence remains on the statute books however.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ